Table of Contents

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

int

Members

The members of the collection.

[DataMember]
public IEnumerable<UserIdentity> Members { get; }

Property Value

IEnumerable<UserIdentity>

Methods

Add(UserIdentity)

Adds a user identity to the collection.

public bool Add(UserIdentity identity)

Parameters

identity UserIdentity

The 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 UserIdentity

The 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

bool

GetEnumerator()

public IEnumerator<UserIdentity> GetEnumerator()

Returns

IEnumerator<UserIdentity>

Remove(UserIdentity)

Remove a user identity from the collection.

public bool Remove(UserIdentity identity)

Parameters

identity UserIdentity

The user identity.

Returns

bool

True if removed, false otherwise.