Share via


SPRoleCollection members

NOTE: This API is now obsolete.

Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, SPRoleCollection represented a collection of SPRole objects and is maintained for backward compatibility.)

The SPRoleCollection type exposes the following members.

Properties

  Name Description
Public property Count Obsolete. Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, the Count property returned the number of roles in the collection and is maintained for backward compatibility.). (Overrides SPBaseCollection.Count.)
Public property Item[Int32] Obsolete. Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, the Item property returned the role object at the specified index in the collection and is maintained for backward compatibility.)
Public property Item[String] Obsolete. Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, the Item property returned the role object with the specified name from the collection and is maintained for backward compatibility.)
Public property Web Obsolete. Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, the Web property returned the parent Web site for the collection of roles and is maintained for backward compatibility.)
Public property Xml Obsolete. Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, the Xml property returned the collection of roles in XML format and is maintained for backward compatibility.)

Top

Methods

  Name Description
Public method Add Obsolete. Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, the Add method created a role object with the specified name, description, and permission mask in the collection and is maintained for backward compatibility.)
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetByID Obsolete. Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, the GetByID method returned the role with the specified member ID and is maintained for backward compatibility.)
Public method GetCollection Obsolete. Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see 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.)
Public method GetEnumerator Gets an enumerator to iterate through the collection. (Inherited from SPBaseCollection.)
Public method GetHashCode (Inherited from Object.)
Public method GetSpecialRole Obsolete. Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, the GetCollection method returned a system role specified by its type and is maintained for backward compatibility.)
Public method GetType (Inherited from Object.)
Public method GetTypedEnumerator<T> Returns a type-safe enumerator to iterate through the collection. (Inherited from SPBaseCollection.)
Protected method MemberwiseClone (Inherited from Object.)
Public method Remove(Int32) Obsolete. Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, the Remove method removed the role at the specified index in the collection and is maintained for backward compatibility.)
Public method Remove(String) Obsolete. Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, the Remove method removed the role with the specified name from the collection and is maintained for backward compatibility.)
Public method RemoveByID Obsolete. Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, the RemoveByID method removed the role with the specified member ID from the collection and is maintained for backward compatibility.)
Public method ToString (Inherited from Object.)

Top

Explicit interface implementations

  Name Description
Explicit interface implemetationPrivate method ICollection.CopyTo Copies the elements of the collection to an array, starting at the specified array index. (Inherited from SPBaseCollection.)
Explicit interface implemetationPrivate property ICollection.IsSynchronized Gets a Boolean value that indicates whether access to the collection is synchronized or thread-safe. (Inherited from SPBaseCollection.)
Explicit interface implemetationPrivate property ICollection.SyncRoot Gets an object that is used to synchronize access to the collection. (Inherited from SPBaseCollection.)

Top

See also

Reference

SPRoleCollection class

Microsoft.SharePoint namespace