SPRoleAssignmentCollection 类
Represents a collection of role assignments for a securable object.
继承层次结构
System.Object
Microsoft.SharePoint.Administration.SPAutoSerializingObject
Microsoft.SharePoint.SPBaseCollection
Microsoft.SharePoint.SPRoleAssignmentCollection
命名空间: Microsoft.SharePoint
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public NotInheritable Class SPRoleAssignmentCollection _
Inherits SPBaseCollection
用法
Dim instance As SPRoleAssignmentCollection
public sealed class SPRoleAssignmentCollection : SPBaseCollection
备注
Use the RoleAssignments property of the SPPermissionInfo, SPSecurableObject, SPList, SPListItem, or SPWeb class, to return the collection of role assignments for the given object.
To create a role assignment that has no role definition bindings, use an SPRoleAssignment constructor. To add bound role definitions to a role assignment, use the ImportRoleDefinitionBindings method. Use the Add method of the SPRoleAssignmentCollection class to add a role assignment to the collection of role assignments for the object.
Use an indexer to return a single item from the collection. For example, if the collection is assigned to a variable named myRoleAssignments, use myRoleAssignments[index] in C# or myRoleAssignments(index) in Visual Basic, where index is either the index number of the item in the collection or a string containing the name of the role definition.
线程安全性
该类型的任何公共 静态 (已共享 在 Visual Basic 中) 成员都是线程安全的。不保证任何实例成员都是线程安全的。