Represents typed function pointer implementing IConsumer<T>.
Namespace: DotNext Assembly: DotNext.dll Syntax[CLSCompliant(false)]
public readonly struct Consumer<T> : IConsumer<T>, IFunctional<Action<T>>
Type Parameters Name Description T
The type of the consumer argument.
Constructors | Edit this page View Source Consumer(delegate*<T, void>)Represents typed function pointer implementing IConsumer<T>.
Declarationpublic Consumer(delegate*<T, void> ptr)
Parameters Type Name Description delegate*<T, void> ptr
The function pointer.
Exceptions Properties | Edit this page View Source IsEmptyGets a value indicating that this function pointer is zero.
Declarationpublic bool IsEmpty { get; }
Property Value Exceptions Methods | Edit this page View Source ToDelegate()
Converts this consumer to the delegate of type Action<T>.
Declarationpublic Action<T> ToDelegate()
Returns Type Description Action<T>
The delegate representing the wrapped method.
Exceptions | Edit this page View Source ToString()Gets hexadecimal representation of this pointer.
Declarationpublic override string ToString()
Returns Type Description string
Hexadecimal representation of this pointer.
Overrides Exceptions Operators | Edit this page View Source explicit operator Action<T>(Consumer<T>)Converts this consumer to the delegate of type Action<T>.
Declarationpublic static explicit operator Action<T>(Consumer<T> consumer)
Parameters Type Name Description Consumer<T> consumer
The value representing the pointer to the method.
Returns Type Description Action<T>The delegate representing the wrapped method.
Exceptions | Edit this page View Source implicit operator Consumer<T>(delegate*<T, void>)Wraps the function pointer.
Declarationpublic static implicit operator Consumer<T>(delegate*<T, void> ptr)
Parameters Type Name Description delegate*<T, void> ptr
The pointer to the managed method.
Returns Type Description Consumer<T>The typed function pointer.
Exceptions Implements Extension MethodsRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4