Search Results for

    Show / Hide Table of Contents

    Class FeatureExtensions

    Class that deals with feature activation and deactivation

    Inheritance
    System.Object
    FeatureExtensions
    Namespace: Microsoft.SharePoint.Client
    Assembly: PnP.Framework.dll
    Syntax
    public static class FeatureExtensions : object

    Methods

    ActivateFeature(Site, Guid, Boolean, Int32)

    Activates a site collection or site scoped feature

    Declaration
    public static void ActivateFeature(this Site site, Guid featureID, bool sandboxed = false, int pollingIntervalSeconds = 30)
    Parameters
    Site site

    Site to be processed

    Guid featureID

    ID of the feature to activate

    System.Boolean sandboxed

    Set to true if the feature is defined in a sandboxed solution

    System.Int32 pollingIntervalSeconds

    The time in seconds between polls for "IsActive"

    ActivateFeature(Web, Guid, Boolean, Int32)

    Activates a site collection or site scoped feature

    Declaration
    public static void ActivateFeature(this Web web, Guid featureID, bool sandboxed = false, int pollingIntervalSeconds = 30)
    Parameters
    Web web

    Web to be processed - can be root web or sub web

    Guid featureID

    ID of the feature to activate

    System.Boolean sandboxed

    Set to true if the feature is defined in a sandboxed solution

    System.Int32 pollingIntervalSeconds

    The time in seconds between polls for "IsActive"

    ActivateFeatureAsync(Site, Guid, Boolean, Int32)

    Activates a site collection or site scoped feature

    Declaration
    public static async Task ActivateFeatureAsync(this Site site, Guid featureID, bool sandboxed = false, int pollingIntervalSeconds = 30)
    Parameters
    Site site

    Site to be processed

    Guid featureID

    ID of the feature to activate

    System.Boolean sandboxed

    Set to true if the feature is defined in a sandboxed solution

    System.Int32 pollingIntervalSeconds

    The time in seconds between polls for "IsActive"

    Returns
    Task

    ActivateFeatureAsync(Web, Guid, Boolean, Int32)

    Activates a site collection or site scoped feature

    Declaration
    public static async Task ActivateFeatureAsync(this Web web, Guid featureID, bool sandboxed = false, int pollingIntervalSeconds = 30)
    Parameters
    Web web

    Web to be processed - can be root web or sub web

    Guid featureID

    ID of the feature to activate

    System.Boolean sandboxed

    Set to true if the feature is defined in a sandboxed solution

    System.Int32 pollingIntervalSeconds

    The time in seconds between polls for "IsActive"

    Returns
    Task

    DeactivateFeature(Site, Guid, Int32)

    Deactivates a site collection or site scoped feature

    Declaration
    public static void DeactivateFeature(this Site site, Guid featureID, int pollingIntervalSeconds = 30)
    Parameters
    Site site

    Site to be processed

    Guid featureID

    ID of the feature to deactivate

    System.Int32 pollingIntervalSeconds

    The time in seconds between polls for "IsActive"

    DeactivateFeature(Web, Guid, Int32)

    Deactivates a site collection or site scoped feature

    Declaration
    public static void DeactivateFeature(this Web web, Guid featureID, int pollingIntervalSeconds = 30)
    Parameters
    Web web

    Web to be processed - can be root web or sub web

    Guid featureID

    ID of the feature to deactivate

    System.Int32 pollingIntervalSeconds

    The time in seconds between polls for "IsActive"

    DeactivateFeatureAsync(Site, Guid, Int32)

    Deactivates a site collection or site scoped feature

    Declaration
    public static async Task DeactivateFeatureAsync(this Site site, Guid featureID, int pollingIntervalSeconds = 30)
    Parameters
    Site site

    Site to be processed

    Guid featureID

    ID of the feature to deactivate

    System.Int32 pollingIntervalSeconds

    The time in seconds between polls for "IsActive"

    Returns
    Task

    DeactivateFeatureAsync(Web, Guid, Int32)

    Deactivates a site collection or site scoped feature

    Declaration
    public static async Task DeactivateFeatureAsync(this Web web, Guid featureID, int pollingIntervalSeconds = 30)
    Parameters
    Web web

    Web to be processed - can be root web or sub web

    Guid featureID

    ID of the feature to deactivate

    System.Int32 pollingIntervalSeconds

    The time in seconds between polls for "IsActive"

    Returns
    Task

    IsFeatureActive(Site, Guid)

    Checks if a feature is active

    Declaration
    public static bool IsFeatureActive(this Site site, Guid featureID)
    Parameters
    Site site

    Site to operate against

    Guid featureID

    ID of the feature to check

    Returns
    System.Boolean

    True if active, false otherwise

    IsFeatureActive(Web, Guid)

    Checks if a feature is active

    Declaration
    public static bool IsFeatureActive(this Web web, Guid featureID)
    Parameters
    Web web

    Web to operate against

    Guid featureID

    ID of the feature to check

    Returns
    System.Boolean

    True if active, false otherwise

    IsFeatureActiveAsync(Site, Guid)

    Checks if a feature is active

    Declaration
    public static async Task<bool> IsFeatureActiveAsync(this Site site, Guid featureID)
    Parameters
    Site site

    Site to operate against

    Guid featureID

    ID of the feature to check

    Returns
    Task<System.Boolean>

    True if active, false otherwise

    IsFeatureActiveAsync(Web, Guid)

    Checks if a feature is active

    Declaration
    public static async Task<bool> IsFeatureActiveAsync(this Web web, Guid featureID)
    Parameters
    Web web

    Web to operate against

    Guid featureID

    ID of the feature to check

    Returns
    Task<System.Boolean>

    True if active, false otherwise

    Back to top PnP Framework
    Generated by DocFX with Material UI
    spacer