Struct DelegatingSupplier<TResult>
Assembly: DotNext.dll
Syntax
public readonly struct DelegatingSupplier<TResult> : ISupplier<TResult>, IFunctional, IEquatable<DelegatingSupplier<TResult>> where TResult : allows ref struct
Type Parameters
| Name |
Description |
| TResult |
The type of the result.
|
Constructors
View Source
DelegatingSupplier(Func<TResult>)
Wraps the delegate instance.
Declaration
public DelegatingSupplier(Func<TResult> func)
Parameters
| Type |
Name |
Description |
| Func<TResult> |
func |
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(DelegatingSupplier<TResult>)
Declaration
public bool Equals(DelegatingSupplier<TResult> 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 ==(DelegatingSupplier<TResult>, DelegatingSupplier<TResult>)
Declaration
public static bool operator ==(DelegatingSupplier<TResult> left, DelegatingSupplier<TResult> right)
Parameters
Returns
View Source
implicit operator DelegatingSupplier<TResult>(Func<TResult>)
Wraps the delegate instance.
Declaration
public static implicit operator DelegatingSupplier<TResult>(Func<TResult> func)
Parameters
| Type |
Name |
Description |
| Func<TResult> |
func |
The delegate instance.
|
Returns
Exceptions
View Source
operator !=(DelegatingSupplier<TResult>, DelegatingSupplier<TResult>)
Declaration
public static bool operator !=(DelegatingSupplier<TResult> left, DelegatingSupplier<TResult> right)
Parameters
Returns
Implements
Extension Methods