Struct AsyncEventHub.EventGroup
Represents a group of events.
Implements
Inherited Members
Namespace: DotNext.Threading
Assembly: DotNext.Threading.dll
Syntax
public readonly record struct AsyncEventHub.EventGroup : IReadOnlyCollection<int>, IEnumerable<int>, IEnumerable, IEquatable<AsyncEventHub.EventGroup>
Remarks
It's better to cache a set of necessary event groups rather than create them on the fly due to performance reasons.
Constructors
| Edit this page View SourceEventGroup(ReadOnlySpan<int>)
Initializes a new group of events.
Declaration
public EventGroup(ReadOnlySpan<int> indices)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<int> | indices | Indices of the events. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException |
|
Properties
| Edit this page View SourceCount
Gets a number of events in this group.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
| Edit this page View SourceContains(int)
Checks whether the specified event is in this group.
Declaration
public bool Contains(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index of the event. |
Returns
| Type | Description |
|---|---|
| bool | true if the event with index |
GetEnumerator()
Gets an enumerator over indices in this group.
Declaration
public AsyncEventHub.EventGroup.Enumerator GetEnumerator()
Returns
| Type | Description |
|---|---|
| AsyncEventHub.EventGroup.Enumerator | An enumerator over indices. |