共用方式為


SPFeatureDefinition.Scope property

取得此功能的範圍。

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

Syntax

'宣告
Public ReadOnly Property Scope As SPFeatureScope
    Get
'用途
Dim instance As SPFeatureDefinition
Dim value As SPFeatureScope

value = instance.Scope
public SPFeatureScope Scope { get; }

Property value

Type: Microsoft.SharePoint.SPFeatureScope
指定伺服器陣列、 Web 應用程式、 網站集合或網站範圍為SPFeatureScope值。

Exceptions

Exception Condition
ArgumentException

屬性是a null reference (Nothing in Visual Basic)。

備註

當網站的功能在個別網站層級設定範圍時,網站集合功能包含套用至整個 (例如內容類型的整個網站集合共用),網站集合的項目以及每個站台,即可啟用的項目。可以有網站集合或網站範圍的元素包括 (範本和執行個體) 的清單定義、 模組 (檔案集),與項目內容類型行為 (每個項目自訂功能表選項及每個項目事件)。

請參閱

參照

SPFeatureDefinition class

SPFeatureDefinition members

Microsoft.SharePoint.Administration namespace

其他資源

啟動相依性和範圍

元素類型