Table of Contents

Class EndorsementCollection

Namespace
MarymoorStudios.Core.Rpc.Identity
Assembly
MarymoorStudios.Core.Rpc.Identity.dll

An unordered set of Endorsement.

[DataContract]
public sealed class EndorsementCollection : IEnumerable<Endorsement>, IEnumerable
Inheritance
EndorsementCollection
Implements
Inherited Members

Constructors

EndorsementCollection()

Create an empty collection.

public EndorsementCollection()

EndorsementCollection(IEnumerable<Endorsement>)

Create a collection prepopulated with a set of initial members.

public EndorsementCollection(IEnumerable<Endorsement> members)

Parameters

members IEnumerable<Endorsement>

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<Endorsement> Members { get; }

Property Value

IEnumerable<Endorsement>

Methods

Add(Endorsement)

Adds an endorsement to the collection.

public bool Add(Endorsement endorsement)

Parameters

endorsement Endorsement

The endorsement.

Returns

bool

True if successfully added, false otherwise.

AddOrUpdate(Endorsement)

Adds or updates an endorsement to the collection.

public bool AddOrUpdate(Endorsement endorsement)

Parameters

endorsement Endorsement

The endorsement.

Returns

bool

True if updated, false if added.

Contains(Endorsement)

Returns true if the endorsement is a member of the collection, false otherwise.

public bool Contains(Endorsement endorsement)

Parameters

endorsement Endorsement

Returns

bool

GetEnumerator()

public IEnumerator<Endorsement> GetEnumerator()

Returns

IEnumerator<Endorsement>

Remove(Endorsement)

Remove an endorsement from the collection.

public bool Remove(Endorsement endorsement)

Parameters

endorsement Endorsement

The endorsement.

Returns

bool

True if removed, false otherwise.