SPSite.GetSelfServiceSiteCreationSettings method
取得用於自助網站架設] 的設定。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Sub GetSelfServiceSiteCreationSettings ( _
<OutAttribute> ByRef bIsSscEnabled As Boolean, _
<OutAttribute> ByRef bRequireSecondaryContact As Boolean, _
<OutAttribute> ByRef strInclusionExclusions As String _
)
'用途
Dim instance As SPSite
Dim bIsSscEnabled As Boolean
Dim bRequireSecondaryContact As Boolean
Dim strInclusionExclusions As String
instance.GetSelfServiceSiteCreationSettings(bIsSscEnabled, _
bRequireSecondaryContact, strInclusionExclusions)
public void GetSelfServiceSiteCreationSettings(
out bool bIsSscEnabled,
out bool bRequireSecondaryContact,
out string strInclusionExclusions
)
參數
bIsSscEnabled
Type: System.Boolean這個方法傳回時,包含true如果網站集合中,否則已啟用 [自助網站架設否則, false。
bRequireSecondaryContact
Type: System.Boolean這個方法傳回時,包含true如果次要擁有者由使用 [自助網站架設 ; 每個站台需要否則, false。
strInclusionExclusions
Type: System.String這個方法傳回時,包含 URL 中的命名空間包含或排除在SharePoint Server應用程式中的 XML 格式。
備註
這個方法會傳回當做輸出參數用於自助網站架設] 的設定。
Examples
下列程式碼範例會顯示在指定的網站集合的自助網站架設] 設定。
Dim boolSSCEnabled As Boolean
Dim boolReqSecondContact As Boolean
Dim strIncludeExclude As String
Using oSiteCollection As New SPSite("http://" + System.Environment.MachineName)
oSiteCollection.GetSelfServiceSiteCreationSettings(boolSSCEnabled, boolReqSecondContact, strIncludeExclude)
Console.WriteLine(("ssc enabled: " + boolSSCEnabled.ToString()))
Console.WriteLine(("sec contact: " + boolReqSecondContact.ToString()))
Console.WriteLine(("prefix string: " + strIncludeExclude))
End Using
bool boolSSCEnabled;
bool boolReqSecondContact;
string strIncludeExclude;
using (SPSite oSiteCollection = new SPSite("http://" + System.Environment.MachineName))
{
oSiteCollection.GetSelfServiceSiteCreationSettings(out boolSSCEnabled, out
boolReqSecondContact, out strIncludeExclude);
Console.WriteLine("ssc enabled: "+ boolSSCEnabled.ToString());
Console.WriteLine("sec contact: "+ boolReqSecondContact.ToString());
Console.WriteLine("prefix string: "+ strIncludeExclude);
}
注意事項 |
---|
某些物件實作IDisposable介面,並且您必須避免之後不再需要保留這些物件在記憶體中。良好的程式碼撰寫方式的相關資訊,請參閱Disposing Objects。 |