Class UserIdentityCollection
- Namespace
- MarymoorStudios.Core.Rpc.Identity
- Assembly
- MarymoorStudios.Core.Rpc.Identity.dll
An unordered set of UserIdentity.
[DataContract]
public sealed class UserIdentityCollection : IEnumerable<UserIdentity>, IEnumerable
- Inheritance
-
UserIdentityCollection
- Implements
- Inherited Members
Constructors
UserIdentityCollection()
Create an empty collection.
public UserIdentityCollection()
UserIdentityCollection(IEnumerable<UserIdentity>)
Create a collection prepopulated with a set of initial members.
public UserIdentityCollection(IEnumerable<UserIdentity> members)
Parameters
members
IEnumerable<UserIdentity>The initial members.
Properties
Count
The number of entries in the collection.
public int Count { get; }
Property Value
Members
The members of the collection.
[DataMember]
public IEnumerable<UserIdentity> Members { get; }
Property Value
Methods
Add(UserIdentity)
Adds a user identity to the collection.
public bool Add(UserIdentity identity)
Parameters
identity
UserIdentityThe user identity.
Returns
- bool
True if successfully added, false otherwise.
AddOrUpdate(UserIdentity)
Adds or updates a user identity to the collection.
public bool AddOrUpdate(UserIdentity identity)
Parameters
identity
UserIdentityThe user identity.
Returns
- bool
True if updated, false if added.
Contains(UserIdentity)
Returns true if the identity is a member of the collection, false otherwise.
public bool Contains(UserIdentity identity)
Parameters
identity
UserIdentity
Returns
GetEnumerator()
public IEnumerator<UserIdentity> GetEnumerator()
Returns
Remove(UserIdentity)
Remove a user identity from the collection.
public bool Remove(UserIdentity identity)
Parameters
identity
UserIdentityThe user identity.
Returns
- bool
True if removed, false otherwise.