SPPolicyRole class

Defines the rights granted and denied to a single policy role.

Inheritance hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPAutoSerializingObject
    Microsoft.SharePoint.Administration.SPPolicyRole

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public NotInheritable Class SPPolicyRole _
    Inherits SPAutoSerializingObject
'Usage
Dim instance As SPPolicyRole
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public sealed class SPPolicyRole : SPAutoSerializingObject

Remarks

Use the PolicyRoles property of the SPWebApplication class to return the collection of policy roles for the Web application.

Use an indexer to return a single policy role from the collection. For example, if the collection is assigned to a variable named myPolicyRoles, use myPolicyRoles[index] in C#, or myPolicyRoles(index) in Visual Basic, where index is either the name or the index number of the policy role in the collection.

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See also

Reference

SPPolicyRole members

Microsoft.SharePoint.Administration namespace