Share via


SPQuotaTemplateCollection.Add-Methode

Erstellt ein Quota Template-Objekt in der Auflistung.

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

Syntax

'Declaration
Public Sub Add ( _
    qt As SPQuotaTemplate _
)
'Usage
Dim instance As SPQuotaTemplateCollection
Dim qt As SPQuotaTemplate

instance.Add(qt)
public void Add(
    SPQuotaTemplate qt
)

Parameter

Beispiele

Das folgende Codebeispiel erstellt eine Kontingentvorlage in der Auflistung von Kontingentvorlagen für die aktuelle Bereitstellung von Microsoft SharePoint Foundation.

Dim webService As New SPWebService()
Dim tempCollection As SPQuotaTemplateCollection = webService.QuotaTemplates

Dim newTemplate As New SPQuotaTemplate()

newTemplate.Name = "MyTemplate "
newTemplate.StorageMaximumLevel = 20000000 'bytes
newTemplate.StorageWarningLevel = 10000000 'bytes

tempCollection.Add(newTemplate) 
SPWebService webService = new SPWebService();
SPQuotaTemplateCollection tempCollection = webService.QuotaTemplates;

SPQuotaTemplate newTemplate = new SPQuotaTemplate();

newTemplate.Name = "MyTemplate";
newTemplate.StorageMaximumLevel = 20000000 //bytes;
newTemplate.StorageWarningLevel = 10000000 //bytes;

tempCollection.Add(newTemplate);

Siehe auch

Referenz

SPQuotaTemplateCollection Klasse

SPQuotaTemplateCollection-Member

Microsoft.SharePoint.Administration-Namespace