SPRoleAssignmentCollection.GetAssignmentByPrincipal 方法

Gets the role assignment object based on the specified user or group.

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

语法

声明
Public Function GetAssignmentByPrincipal ( _
    principalToFind As SPPrincipal _
) As SPRoleAssignment
用法
Dim instance As SPRoleAssignmentCollection
Dim principalToFind As SPPrincipal
Dim returnValue As SPRoleAssignment

returnValue = instance.GetAssignmentByPrincipal(principalToFind)
public SPRoleAssignment GetAssignmentByPrincipal(
    SPPrincipal principalToFind
)

参数

返回值

类型:Microsoft.SharePoint.SPRoleAssignment
The role assignment for the specified user or group.

异常

异常 条件
ArgumentNullException

principalToFind is null .

备注

This method retrieves the role assignment of the user or group specified by the principalToFind parameter.

另请参阅

引用

SPRoleAssignmentCollection 类

SPRoleAssignmentCollection 成员

Microsoft.SharePoint 命名空间