SPFeatureDefinition.Scope property
Gets the scope of this Feature.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
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
Microsoft.SharePoint.Administration namespace
Other resources
Activation Dependencies and Scope
Element Types