SPRoleAssignmentCollection.Add 方法 (SPRoleAssignment)

Adds a role assignment to the collection of role assignment objects.

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Sub Add ( _
    roleAssignment As SPRoleAssignment _
)
用法
Dim instance As SPRoleAssignmentCollection
Dim roleAssignment As SPRoleAssignment

instance.Add(roleAssignment)
public void Add(
    SPRoleAssignment roleAssignment
)

参数

备注

This method fails if the collection already contains a role assignment for the security principal specified in the Member property of roleAssignment.

This method ensures that the security principal in the Member property of roleAssignment has at least SPRoleType.Guest access to objects in all parent scopes. To limit the access of the security principal to objects only in the current scope, call the AddToCurrentScopeOnly(SPRoleAssignment) method.

另请参阅

引用

SPRoleAssignmentCollection 类

SPRoleAssignmentCollection 成员

Add 重载

Microsoft.SharePoint 命名空间