Compartilhar via


SPQuotaTemplateCollection Class

The SPQuotaTemplateCollection class represents a collection of SPQuotaTemplate objects.

System.Object

   Microsoft.SharePoint.Administration.SPQuotaTemplateCollection

Public Methods

The following table shows the public methods of the SPQuotaTemplateCollection class and a brief description of each.

Name Description
Add Creates a quota template object in the collection.
Clear Removes all quota template objects from the collection.
Delete Deletes the quota template object with the specified name from the collection.

Public Properties

The following table shows the public properties of the SPQuotaTemplateCollection class, the data type of each property, and a brief description of each.

Name Data Type Description
Count Int32 Gets the number of quota templates in the collection.
Item(Int32) Microsoft.SharePoint.Administration.SPQuotaTemplate Gets the quota template object at the specified index in the collection.
Item(String) Microsoft.SharePoint.Administration.SPQuotaTemplate Gets or sets a quota template object with the specified name in the collection.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Remarks

Use the QuotaTemplates property of the SPGlobalConfig class to return an SPQuotaTemplateCollection object that represents the collection of quota templates for a server or server farm. To create a quota template, use the Add method represented in the first table in this topic.

Use an indexer to return a single quota template from the collection. For example, if the collection is assigned to a variable named myQuotaTemplates, use myQuotaTemplates[index] in C#, or myQuotaTemplates(index) in Visual Basic .NET, where index is either the index number of the template in the collection or the display name of the template.

Requirements

Namespace: Microsoft.SharePoint.Administration

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services (in Microsoft.SharePoint.dll)

Security: Code Access Security