Search Results for

    Show / Hide Table of Contents

    Class InformationManagementExtensions

    Class that deals with information management features

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

    Methods

    ApplySitePolicy(Web, String)

    Apply a policy to a site

    Declaration
    public static bool ApplySitePolicy(this Web web, string sitePolicy)
    Parameters
    Web web

    Web to operate on

    System.String sitePolicy

    Policy to apply

    Returns
    System.Boolean

    True if applied, false otherwise

    ApplySitePolicyAsync(Web, String)

    Apply a policy to a site

    Declaration
    public static async Task<bool> ApplySitePolicyAsync(this Web web, string sitePolicy)
    Parameters
    Web web

    Web to operate on

    System.String sitePolicy

    Policy to apply

    Returns
    Task<System.Boolean>

    True if applied, false otherwise

    GetAppliedSitePolicy(Web)

    Gets the site policy that currently is applied

    Declaration
    public static SitePolicyEntity GetAppliedSitePolicy(this Web web)
    Parameters
    Web web

    Web to operate on

    Returns
    SitePolicyEntity

    A SitePolicyEntity object holding the applied policy

    GetAppliedSitePolicyAsync(Web)

    Gets the site policy that currently is applied

    Declaration
    public static async Task<SitePolicyEntity> GetAppliedSitePolicyAsync(this Web web)
    Parameters
    Web web

    Web to operate on

    Returns
    Task<SitePolicyEntity>

    A SitePolicyEntity object holding the applied policy

    GetSiteCloseDate(Web)

    Gets the site closure date

    Declaration
    public static DateTime GetSiteCloseDate(this Web web)
    Parameters
    Web web

    Web to operate on

    Returns
    DateTime

    DateTime value holding the closure date, DateTime.MinValue in case there was no policy applied

    GetSiteCloseDateAsync(Web)

    Gets the site closure date

    Declaration
    public static async Task<DateTime> GetSiteCloseDateAsync(this Web web)
    Parameters
    Web web

    Web to operate on

    Returns
    Task<DateTime>

    DateTime value holding the closure date, DateTime.MinValue in case there was no policy applied

    GetSiteExpirationDate(Web)

    Gets the site expiration date

    Declaration
    public static DateTime GetSiteExpirationDate(this Web web)
    Parameters
    Web web

    Web to operate on

    Returns
    DateTime

    DateTime value holding the expiration date, DateTime.MinValue in case there was no policy applied

    GetSiteExpirationDateAsync(Web)

    Gets the site expiration date

    Declaration
    public static async Task<DateTime> GetSiteExpirationDateAsync(this Web web)
    Parameters
    Web web

    Web to operate on

    Returns
    Task<DateTime>

    DateTime value holding the expiration date, DateTime.MinValue in case there was no policy applied

    GetSitePolicies(Web)

    Gets a list of the available site policies

    Declaration
    public static List<SitePolicyEntity> GetSitePolicies(this Web web)
    Parameters
    Web web

    Web to operate on

    Returns
    List<SitePolicyEntity>

    A list of SitePolicyEntity objects

    GetSitePoliciesAsync(Web)

    Gets a list of the available site policies

    Declaration
    public static async Task<List<SitePolicyEntity>> GetSitePoliciesAsync(this Web web)
    Parameters
    Web web

    Web to operate on

    Returns
    Task<List<SitePolicyEntity>>

    A list of SitePolicyEntity objects

    GetSitePolicyByName(Web, String)

    Gets the site policy with the given name

    Declaration
    public static SitePolicyEntity GetSitePolicyByName(this Web web, string sitePolicy)
    Parameters
    Web web

    Web to operate on

    System.String sitePolicy

    Site policy to fetch

    Returns
    SitePolicyEntity

    A SitePolicyEntity object holding the fetched policy

    GetSitePolicyByNameAsync(Web, String)

    Gets the site policy with the given name

    Declaration
    public static async Task<SitePolicyEntity> GetSitePolicyByNameAsync(this Web web, string sitePolicy)
    Parameters
    Web web

    Web to operate on

    System.String sitePolicy

    Site policy to fetch

    Returns
    Task<SitePolicyEntity>

    A SitePolicyEntity object holding the fetched policy

    HasSitePolicyApplied(Web)

    Does this web have a site policy applied?

    Declaration
    public static bool HasSitePolicyApplied(this Web web)
    Parameters
    Web web

    Web to operate on

    Returns
    System.Boolean

    True if a policy has been applied, false otherwise

    HasSitePolicyAppliedAsync(Web)

    Does this web have a site policy applied?

    Declaration
    public static async Task<bool> HasSitePolicyAppliedAsync(this Web web)
    Parameters
    Web web

    Web to operate on

    Returns
    Task<System.Boolean>

    True if a policy has been applied, false otherwise

    IsClosedBySitePolicy(Web)

    Check if a site is closed

    Declaration
    public static bool IsClosedBySitePolicy(this Web web)
    Parameters
    Web web

    Web to operate on

    Returns
    System.Boolean

    True if site is closed, false otherwise

    IsClosedBySitePolicyAsync(Web)

    Check if a site is closed

    Declaration
    public static async Task<bool> IsClosedBySitePolicyAsync(this Web web)
    Parameters
    Web web

    Web to operate on

    Returns
    Task<System.Boolean>

    True if site is closed, false otherwise

    SetClosedBySitePolicy(Web)

    Close a site, if it has a site policy applied and is currently not closed

    Declaration
    public static bool SetClosedBySitePolicy(this Web web)
    Parameters
    Web web

    Returns
    System.Boolean

    True if site was closed, false otherwise

    SetClosedBySitePolicyAsync(Web)

    Close a site, if it has a site policy applied and is currently not closed

    Declaration
    public static async Task<bool> SetClosedBySitePolicyAsync(this Web web)
    Parameters
    Web web

    Returns
    Task<System.Boolean>

    True if site was closed, false otherwise

    SetOpenBySitePolicy(Web)

    Open a site, if it has a site policy applied and is currently closed

    Declaration
    public static bool SetOpenBySitePolicy(this Web web)
    Parameters
    Web web

    Returns
    System.Boolean

    True if site was opened, false otherwise

    SetOpenBySitePolicyAsync(Web)

    Open a site, if it has a site policy applied and is currently closed

    Declaration
    public static async Task<bool> SetOpenBySitePolicyAsync(this Web web)
    Parameters
    Web web

    Returns
    Task<System.Boolean>

    True if site was opened, false otherwise

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