Метод SPQuotaTemplateCollection.Add
Создает объект шаблон квот в коллекции.
Пространство имен: Microsoft.SharePoint.Administration
Сборка: Microsoft.SharePoint (в Microsoft.SharePoint.dll)
Синтаксис
'Декларация
Public Sub Add ( _
qt As SPQuotaTemplate _
)
'Применение
Dim instance As SPQuotaTemplateCollection
Dim qt As SPQuotaTemplate
instance.Add(qt)
public void Add(
SPQuotaTemplate qt
)
Параметры
qt
Тип: Microsoft.SharePoint.Administration.SPQuotaTemplateОбъект SPQuotaTemplate , который представляет новый шаблон квот.
Примеры
В следующем примере кода создается шаблон квот в коллекцию шаблонов квот для текущего развертывания 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);
См. также
Справочные материалы
SPQuotaTemplateCollection класс