Share via


SPSite.GetSelfServiceSiteCreationSettings-Methode

Ruft die Einstellungen, die für Self-Service Site Creation verwendet werden.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Sub GetSelfServiceSiteCreationSettings ( _
    <OutAttribute> ByRef bIsSscEnabled As Boolean, _
    <OutAttribute> ByRef bRequireSecondaryContact As Boolean, _
    <OutAttribute> ByRef strInclusionExclusions As String _
)
'Usage
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
)

Parameter

  • bIsSscEnabled
    Typ: System.Boolean

    Wenn diese Methode zurückgegeben wird, enthält die true bei Self-Service Site Creation für die Websitesammlung aktiviert ist; andernfalls false.

  • bRequireSecondaryContact
    Typ: System.Boolean

    Bei dieser Methode zurückgegeben wird, enthält die true bei ein sekundärer Besitzer für jeden Standort erforderlich ist, die unter Verwendung der Self-Service Site Creation erstellt wird; andernfalls false.

  • strInclusionExclusions
    Typ: System.String

    Wenn diese Methode zurückgegeben wird, enthält die URL-Namespaces in XML-Format, das ein- oder in der Anwendung SharePoint Server ausgeschlossen werden.

Hinweise

Diese Methode gibt die Einstellungen als Output-Parameter, die für Self-Service Site Creation verwendet werden.

Beispiele

Das folgende Codebeispiel zeigt die Self-Service Site Creation-Einstellungen für eine angegebene Websitesammlung.

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

Hinweis

Bestimmte Objekte die IDisposable -Schnittstelle implementieren, und Sie müssen vermeiden, diese Objekte im Arbeitsspeicher beibehalten, wenn sie nicht mehr benötigt werden. Informationen zu bewährten Codierung finden Sie unter Disposing Objects.

Siehe auch

Referenz

SPSite Klasse

SPSite-Member

Microsoft.SharePoint-Namespace