SPRoleCollection.GetCollection 方法

请注意:此 API 现在已过时。

Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Changes in the Authorization Object Model. (In Windows SharePoint Services 2.0, the GetCollection method returned the roles specified by an array of names from the collection and is maintained for backward compatibility.)

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

语法

声明
<ObsoleteAttribute("Use the SPRoleDefinitionCollection class instead")> _
Public Function GetCollection ( _
    names As String() _
) As SPRoleCollection
用法
Dim instance As SPRoleCollection
Dim names As String()
Dim returnValue As SPRoleCollection

returnValue = instance.GetCollection(names)
[ObsoleteAttribute("Use the SPRoleDefinitionCollection class instead")]
public SPRoleCollection GetCollection(
    string[] names
)

参数

  • names
    类型:[]

    一个包含名称的字符串数组。

返回值

类型:Microsoft.SharePoint.SPRoleCollection
一个代表角色SPRoleCollection对象。

另请参阅

引用

SPRoleCollection 类

SPRoleCollection 成员

Microsoft.SharePoint 命名空间