SPFeatureDefinition.Scope Property
Gets the scope of this Feature.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Property Value
Type: Microsoft.SharePoint.SPFeatureScopeAn SPFeatureScope value that specifies server farm, Web application, site collection, or Web site as the scope.
| Exception | Condition |
|---|---|
| ArgumentException |
Property is null. |
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).
Not to be confused with the SPFeatureDefinitionScope enum
...which is used to differentiate Farm vs. Sandboxed feature definitions when activating a feature at the Site or Web level.
SPFeatureCollection.Add:
http://msdn.microsoft.com/en-us/library/ee549179(office.14).aspx
SPFeatureDefinition:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfeaturedefinitionscope(office.14).aspx
SPFeatureCollection.Add:
http://msdn.microsoft.com/en-us/library/ee549179(office.14).aspx
SPFeatureDefinition:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfeaturedefinitionscope(office.14).aspx
- 3/2/2010
- Stephen Schwink