Share via


ProjectPolicy.ApplyProjectPolicy method

Applies the policy to the site.

Namespace:  Microsoft.SharePoint.Client.InformationPolicy
Assembly:  Microsoft.Office.Client.Policy (in Microsoft.Office.Client.Policy.dll)

Syntax

'Declaration
Public Shared Sub ApplyProjectPolicy ( _
    context As ClientRuntimeContext, _
    web As Web, _
    projectPolicy As ProjectPolicy _
)
'Usage
Dim context As ClientRuntimeContext
Dim web As Web
Dim projectPolicy As ProjectPolicyProjectPolicy.ApplyProjectPolicy(context, _
    web, projectPolicy)
public static void ApplyProjectPolicy(
    ClientRuntimeContext context,
    Web web,
    ProjectPolicy projectPolicy
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

The web parameter or projectPolicy parameter is a null reference (Nothing in Visual Basic).

Remarks

The policy must exist in the current site collection. If the site already has a policy applied, the new policy will replace the existing one.

See also

Reference

ProjectPolicy class

ProjectPolicy members

Microsoft.SharePoint.Client.InformationPolicy namespace