共用方式為


SPQuota.StorageWarningLevel Property

Gets or sets a storage warning level for when administrators of the site collection receive advance notice before available storage is expended.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Property StorageWarningLevel As Long
    Get
    Set
'Usage
Dim instance As SPQuota
Dim value As Long

value = instance.StorageWarningLevel

instance.StorageWarningLevel = value
public long StorageWarningLevel { get; set; }

Property Value

Type: System.Int64
A 64-bit integer that specifies the warning level. The default value is 0 (zero).

Examples

The following code example sets a maximum level and a warning level for storage in a specified site collection.

Dim siteCollection As New SPSite("http://MySiteCollection")
Dim quota As SPQuota = siteCollection.Quota

quota.StorageMaximumLevel = 20000000 'bytes
quota.StorageWarningLevel = 10000000 'bytes

siteCollection.Quota = quota 
SPSite siteCollection = new SPSite("http://MySiteCollection");
SPQuota quota = siteCollection.Quota;

quota.StorageMaximumLevel = 20000000; //bytes
quota.StorageWarningLevel = 10000000; //bytes

siteCollection.Quota = quota;

See Also

Reference

SPQuota Class

SPQuota Members

Microsoft.SharePoint.Administration Namespace