SPSite.Quota-Eigenschaft
Abrufen oder festlegen ein Kontingents für die Websitesammlung.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Property Quota As SPQuota
Get
Set
'Usage
Dim instance As SPSite
Dim value As SPQuota
value = instance.Quota
instance.Quota = value
public SPQuota Quota { get; set; }
Eigenschaftswert
Typ: Microsoft.SharePoint.Administration.SPQuota
Ein SPQuota -Objekt, das Kontingent darstellt.
Beispiele
Im folgenden Codebeispiel wird die Quota -Eigenschaft eine Kontingentvorlage für eine Websitesammlung auf dem angegebenen virtuellen Server anwenden.
Dim uriNew As New Uri("http://Server_Name")
Dim oWebApp As SPWebApplication = SPWebApplication.Lookup(uriNew)
Using oSiteCollection As SPSite = oWebApp.Sites("http://Site_Name")
oSiteCollection.Quota = SPWebService.ContentService.QuotaTemplates("Quota_Template_Name")
End Using
Uri uriNew = new Uri("http://Server_Name");
SPWebApplication oWebApp = SPWebApplication.Lookup(uriNew);
using(SPSite oSiteCollection = oWebApp.Sites["http://Site_Name"])
{
oSiteCollection.Quota = SPWebService.ContentService.QuotaTemplates["Quota_Template_Name"];
}
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.