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
Members
The members of the collection.
[DataMember]
public IEnumerable<Endorsement> Members { get; }
Property Value
Methods
Add(Endorsement)
Adds an endorsement to the collection.
public bool Add(Endorsement endorsement)
Parameters
endorsement
EndorsementThe 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
EndorsementThe 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
GetEnumerator()
public IEnumerator<Endorsement> GetEnumerator()
Returns
Remove(Endorsement)
Remove an endorsement from the collection.
public bool Remove(Endorsement endorsement)
Parameters
endorsement
EndorsementThe endorsement.
Returns
- bool
True if removed, false otherwise.