Struct DelegatingConsumer<T>
Assembly: DotNext.dll
Syntax
public readonly struct DelegatingConsumer<T> : IConsumer<T>, IFunctional, IEquatable<DelegatingConsumer<T>> where T : allows ref struct
Type Parameters
| Name |
Description |
| T |
The type of the consumer argument.
|
Constructors
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
Properties
View Source
IsEmpty
Gets a value indicating that the underlying delegate is null.
Declaration
public bool IsEmpty { get; }
Property Value
Methods
View Source
Equals(DelegatingConsumer<T>)
Declaration
public bool Equals(DelegatingConsumer<T> other)
Parameters
Returns
View Source
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
View Source
ToString()
Declaration
public override string? ToString()
Returns
Overrides
Operators
View Source
operator ==(DelegatingConsumer<T>, DelegatingConsumer<T>)
Declaration
public static bool operator ==(DelegatingConsumer<T> left, DelegatingConsumer<T> right)
Parameters
Returns
View Source
implicit operator DelegatingConsumer<T>(Action<T>)
Declaration
public static implicit operator DelegatingConsumer<T>(Action<T> action)
Parameters
| Type |
Name |
Description |
| Action<T> |
action |
The delegate to be wrapped.
|
Returns
View Source
operator !=(DelegatingConsumer<T>, DelegatingConsumer<T>)
Declaration
public static bool operator !=(DelegatingConsumer<T> left, DelegatingConsumer<T> right)
Parameters
Returns
Implements
Extension Methods