Show / Hide Table of Contents

Struct DelegatingConsumer<T>

Represents implementation of IConsumer<T> that delegates invocation to the delegate of type Action<T>.

Implements
IConsumer<T>
IFunctional<Action<T>>
IEquatable<DelegatingConsumer<T>>
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: DotNext
Assembly: DotNext.dll
Syntax
public readonly record struct DelegatingConsumer<T> : IConsumer<T>, IFunctional<Action<T>>, IEquatable<DelegatingConsumer<T>>
Type Parameters
Name Description
T

The type of the consumer argument.

Constructors

| Edit this page View Source

DelegatingConsumer(Action<T>)

Wraps the delegate instance.

Declaration
public DelegatingConsumer(Action<T> action)
Parameters
Type Name Description
Action<T> action

The delegate instance.

Exceptions
Type Condition
ArgumentNullException

action is null.

Properties

| Edit this page View Source

IsEmpty

Gets a value indicating that the underlying delegate is null.

Declaration
public bool IsEmpty { get; }
Property Value
Type Description
bool

Methods

| Edit this page View Source

ToString()

Returns the fully qualified type name of this instance.

Declaration
public override string? ToString()
Returns
Type Description
string

The fully qualified type name.

Overrides
ValueType.ToString()

Operators

| Edit this page View Source

implicit operator DelegatingConsumer<T>(Action<T>)

Wraps the delegate.

Declaration
public static implicit operator DelegatingConsumer<T>(Action<T> action)
Parameters
Type Name Description
Action<T> action

The delegate to be wrapped.

Returns
Type Description
DelegatingConsumer<T>

The consumer representing the delegate.

Implements

IConsumer<T>
IFunctional<TDelegate>
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)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾