Partilhar via


SPRoleAssignmentCollection Members

Include Protected Members
Include Inherited Members

Represents a collection of role assignments for a securable object.

The SPRoleAssignmentCollection type exposes the following members.

Properties

  Name Description
Public property Count Gets the number of role assignments in the collection. (Overrides SPBaseCollection.Count.)
Public property Id Gets the ID of the role assignment collection.
Public property Item Gets the role assignment at the specified index in the collection.
Public property Parent Obsolete. Gets the parent object that controls the permissions for the object to which the role assignments apply.
Public property ParentSecurableObject Gets the permissions and role assignments for the collection.
Public property UpgradedPersistedProperties (Inherited from SPAutoSerializingObject.)
Public property Xml Gets the role assignment collection in XML format.

Top

Methods

  Name Description
Public method Add(SPPrincipal) Creates a new role assignment for a specified security principal and gives the security principal guest access to objects in the current scope and in all parent scopes.
Public method Add(SPRoleAssignment) Adds a role assignment to the collection of role assignment objects.
Public method AddToCurrentScopeOnly Adds a role assignment to the collection of role assignment objects at the current scope.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetAssignmentByPrincipal Gets the role assignment object based on the specified user or group.
Public method GetEnumerator Gets an enumerator to iterate through the collection. (Inherited from SPBaseCollection.)
Public method GetHashCode (Inherited from Object.)
Public method GetObjectData (Inherited from SPAutoSerializingObject.)
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.)
Protected method OnDeserialization (Inherited from SPAutoSerializingObject.)
Public method Remove(Int32) Removes the user or group at the specified index from the collection.
Public method Remove(SPPrincipal) Removes the specified user or group from the role assignment collection.
Public method RemoveById Removes the user or group with the specified identifier (ID) from the role assignment collection.
Public method RemoveFromCurrentScopeOnly Removes the specified user or group from the current security scope.
Public method ToString (Inherited from Object.)
Protected method UpdateParent (Inherited from SPAutoSerializingObject.)

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

SPRoleAssignmentCollection Class

Microsoft.SharePoint Namespace