C# Class Microsoft.SharePoint.Client.FeatureExtensions

Class that deals with feature activation and deactivation
Mostrar archivo Open project: OfficeDev/PnP-Sites-Core

Public Methods

Method Description
ActivateFeature ( this web, System.Guid featureID, bool sandboxed = false, int pollingIntervalSeconds = 30 ) : void

Activates a site collection or site scoped feature

DeactivateFeature ( this web, System.Guid featureID, int pollingIntervalSeconds = 30 ) : void

Deactivates a site collection or site scoped feature

IsFeatureActive ( this site, System.Guid featureID ) : bool

Checks if a feature is active

Private Methods

Method Description
IsFeatureActiveInternal ( FeatureCollection features, System.Guid featureID, bool noRetry = false ) : bool

Checks if a feature is active in the given FeatureCollection.

ProcessFeature ( this site, System.Guid featureID, bool activate, bool sandboxed, int pollingIntervalSeconds = 30 ) : void

Activates or deactivates a site collection scoped feature

ProcessFeatureInternal ( FeatureCollection features, System.Guid featureID, bool activate, FeatureDefinitionScope scope, int pollingIntervalSeconds = 30 ) : void

Activates or deactivates a site collection or web scoped feature

Method Details

ActivateFeature() public static method

Activates a site collection or site scoped feature
public static ActivateFeature ( this web, System.Guid featureID, bool sandboxed = false, int pollingIntervalSeconds = 30 ) : void
web this Web to be processed - can be root web or sub web
featureID System.Guid ID of the feature to activate
sandboxed bool Set to true if the feature is defined in a sandboxed solution
pollingIntervalSeconds int The time in seconds between polls for "IsActive"
return void

DeactivateFeature() public static method

Deactivates a site collection or site scoped feature
public static DeactivateFeature ( this web, System.Guid featureID, int pollingIntervalSeconds = 30 ) : void
web this Web to be processed - can be root web or sub web
featureID System.Guid ID of the feature to deactivate
pollingIntervalSeconds int The time in seconds between polls for "IsActive"
return void

IsFeatureActive() public static method

Checks if a feature is active
public static IsFeatureActive ( this site, System.Guid featureID ) : bool
site this Site to operate against
featureID System.Guid ID of the feature to check
return bool