Export (0) Print
Expand All

SPPolicy.SPPolicyRoleBindingCollection class

Represents the collection of policy roles through which each user or group is bound to a policy.

System.Object
  Microsoft.SharePoint.Administration.SPAutoSerializingObject
    Microsoft.SharePoint.SPBaseCollection
      Microsoft.SharePoint.Administration.SPPolicy.SPPolicyRoleBindingCollection

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

[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public class SPPolicyRoleBindingCollection : SPBaseCollection

Each user or group is assigned to policy roles using a policy role binding collection. This collection returns policy roles, but it does not define the existence of the policy roles.

Use the PolicyRoleBindings property of the SPPolicy class to return the collection of policy role bindings for a policy. To create a policy role in the collection, use the Add or AddById method.

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

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