Class InformationManagementExtensions
Class that deals with information management features
Inheritance
System.Object
InformationManagementExtensions
Assembly: PnP.Framework.dll
Syntax
public static class InformationManagementExtensions : object
Methods
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
|
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
|
Gets the site policy that currently is applied
Declaration
public static SitePolicyEntity GetAppliedSitePolicy(this Web web)
Parameters
Web
web
Web to operate on
|
Returns
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
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
|
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
|
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
|
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
|
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
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
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
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
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
|
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
|
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
|
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
|
Close a site, if it has a site policy applied and is currently not closed
Declaration
public static bool SetClosedBySitePolicy(this Web web)
Parameters
Returns
System.Boolean
True if site was closed, false otherwise
|
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
Returns
Task<System.Boolean>
True if site was closed, false otherwise
|
Open a site, if it has a site policy applied and is currently closed
Declaration
public static bool SetOpenBySitePolicy(this Web web)
Parameters
Returns
System.Boolean
True if site was opened, false otherwise
|
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
Returns
Task<System.Boolean>
True if site was opened, false otherwise
|