Show / Hide Table of Contents

Struct AsyncEventHub.EventGroup

Represents a group of events.

Implements
IReadOnlyCollection<int>
IEnumerable<int>
IEnumerable
IEquatable<AsyncEventHub.EventGroup>
Inherited Members
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: DotNext.Threading
Assembly: DotNext.Threading.dll
Syntax
public readonly 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

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

View Source

Count

Gets a number of events in this group.

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

Methods

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.

View Source

Equals(EventGroup)

Declaration
public bool Equals(AsyncEventHub.EventGroup other)
Parameters
Type Name Description
AsyncEventHub.EventGroup other
Returns
Type Description
bool
View Source

Equals(object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
ValueType.Equals(object)
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.

View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
ValueType.GetHashCode()
View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
ValueType.ToString()

Operators

View Source

operator ==(EventGroup, EventGroup)

Declaration
public static bool operator ==(AsyncEventHub.EventGroup left, AsyncEventHub.EventGroup right)
Parameters
Type Name Description
AsyncEventHub.EventGroup left
AsyncEventHub.EventGroup right
Returns
Type Description
bool
View Source

operator !=(EventGroup, EventGroup)

Declaration
public static bool operator !=(AsyncEventHub.EventGroup left, AsyncEventHub.EventGroup right)
Parameters
Type Name Description
AsyncEventHub.EventGroup left
AsyncEventHub.EventGroup right
Returns
Type Description
bool

Implements

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

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾