Show / Hide Table of Contents

Struct AsyncEventHub.EventGroup

Represents a group of events.

Implements
IReadOnlyCollection<int>
IEnumerable<int>
IEnumerable
IEquatable<AsyncEventHub.EventGroup>
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
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 Source

EventGroup(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

indices has at least one negative index.

Properties

| Edit this page View Source

Count

Gets a number of events in this group.

Declaration
public int Count { get; }
Property Value
Type Description
int

Methods

| Edit this page View Source

Contains(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 index is in this group; otherwise, false.

| Edit this page View Source

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.

Implements

IReadOnlyCollection<T>
IEnumerable<T>
IEnumerable
IEquatable<T>

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, ReadOnlySpan<T>)
Collection.ToAsyncEnumerator<TEnumerator, T>(TEnumerator, CancellationToken)
Collection.ToClassicEnumerator<TEnumerator, T>(TEnumerator)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
ExpressionBuilder.Const<T>(T)
Collection.Append<T>(IEnumerable<T>, params T[])
Collection.Copy<T>(IEnumerable<T>, int, MemoryAllocator<T>?)
Collection.ElementAt<T>(IEnumerable<T>, int, out T)
Collection.FirstOrNone<T>(IEnumerable<T>)
Collection.ForEachAsync<T>(IEnumerable<T>, Func<T, CancellationToken, ValueTask>, CancellationToken)
Collection.ForEach<T>(IEnumerable<T>, Action<T>)
Collection.LastOrNone<T>(IEnumerable<T>)
Collection.Prepend<T>(IEnumerable<T>, params T[])
Collection.SequenceHashCode<T>(IEnumerable<T>, bool)
Collection.ToAsyncEnumerable<T>(IEnumerable<T>, bool)
Collection.ToString<T>(IEnumerable<T>, string, string)
Enumerator.GetAsyncEnumerator<T>(IEnumerable<T>, CancellationToken)
Collection.Convert<TInput, TOutput>(IReadOnlyCollection<TInput>, Converter<TInput, TOutput>)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾