다음을 통해 공유


SPFeatureDefinition.Scope Property

Gets the scope of this Feature.

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

Syntax

'Declaration
Public ReadOnly Property Scope As SPFeatureScope
    Get
'Usage
Dim instance As SPFeatureDefinition
Dim value As SPFeatureScope

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

Property Value

Type: Microsoft.SharePoint.SPFeatureScope
An SPFeatureScope value that specifies server farm, Web application, site collection, or Web site as the scope.

Exceptions

Exception Condition
ArgumentException

Property is a null reference (Nothing in Visual Basic).

Remarks

While a Web site Feature is scoped at the individual Web site level, a site collection Feature contains items that apply to the site collection as a whole (for example, content types that are shared across the site collection), as well as items that can be activated per site. Elements that can have either site collection or site scope include list definitions (templates and instances), modules (file sets), and item content type behaviors (per-item custom menu options and per-item events).

See Also

Reference

SPFeatureDefinition Class

SPFeatureDefinition Members

Microsoft.SharePoint.Administration Namespace

Other Resources

Activation Dependencies and Scope

Element Types