从指定的角色定义集合中获取具有指定 ID 的 web 组的角色定义。
命名空间: Microsoft.SharePoint.Utilities
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Shared Function GetRoleDefinitionFromLegacyWebGroupId ( _
roles As SPRoleDefinitionCollection, _
webGroupId As Integer _
) As SPRoleDefinition
用法
Dim roles As SPRoleDefinitionCollection
Dim webGroupId As Integer
Dim returnValue As SPRoleDefinition
returnValue = SPUtility.GetRoleDefinitionFromLegacyWebGroupId(roles, _
webGroupId)
public static SPRoleDefinition GetRoleDefinitionFromLegacyWebGroupId(
SPRoleDefinitionCollection roles,
int webGroupId
)
参数
roles
类型:Microsoft.SharePoint.SPRoleDefinitionCollection角色定义的集合。
webGroupId
类型:System.Int32要获取的角色定义的 web 组 ID。
返回值
类型:Microsoft.SharePoint.SPRoleDefinition
Web 组角色定义。
异常
| 异常 | 条件 |
|---|---|
| ArgumentException | 找不到 web 组中的角色定义。 |
备注
此方法从roles参数指定的角色定义集合webGroupId参数指定的 id 获取 web 组的角色定义。