ProjectPolicy.DoesProjectHavePolicy method

Checks whether the site has a policy applied.

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

Syntax

'Declaration
Public Shared Function DoesProjectHavePolicy ( _
    context As ClientRuntimeContext, _
    web As Web _
) As ClientResult(Of Boolean)
'Usage
Dim context As ClientRuntimeContext
Dim web As Web
Dim returnValue As ClientResult(Of Boolean)

returnValue = ProjectPolicy.DoesProjectHavePolicy(context, _
    web)
public static ClientResult<bool> DoesProjectHavePolicy(
    ClientRuntimeContext context,
    Web web
)

Parameters

Return value

Type: Microsoft.SharePoint.Client.ClientResult<Boolean>
true if there is a policy applied on the site; otherwise, false.

Exceptions

Exception Condition
ArgumentNullException

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

See also

Reference

ProjectPolicy class

ProjectPolicy members

Microsoft.SharePoint.Client.InformationPolicy namespace