SPSite.GetSelfServiceSiteCreationSettings 方法

Gets the settings that are used for Self-Service Site Creation.

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
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
    类型:System.Boolean

    When this method returns, contains true if Self-Service Site Creation is enabled for the site collection; otherwise, false.

  • bRequireSecondaryContact
    类型:System.Boolean

    When this method returns, contains true if a secondary owner is required for every site that is created by using Self-Service Site Creation; otherwise, false.

  • strInclusionExclusions
    类型:System.String

    When this method returns, contains the URL namespaces in XML format that are included or excluded in the SharePoint Server application.

备注

This method returns the settings as output parameters that are used for Self-Service Site Creation.

示例

The following code example displays the Self-Service Site Creation settings for a specified site collection.

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);
}

备注

Certain objects implement the IDisposable interface, and you must avoid retaining these objects in memory after they are no longer needed. For information about good coding practices, see Disposing Objects.

另请参阅

引用

SPSite 类

SPSite 成员

Microsoft.SharePoint 命名空间