Interface ITypeShapeFunc
- Namespace
- PolyType.Abstractions
- Assembly
- PolyType.dll
A generic function used to unpack ITypeShape instances.
public interface ITypeShapeFunc
Remarks
Represents a rank-2 function that unpacks the existential type encoded by ITypeShape.
Methods
Invoke<T>(ITypeShape<T>, object?)
Invokes the function using the specified typeShape
and state
.
object? Invoke<T>(ITypeShape<T> typeShape, object? state = null)
Parameters
typeShape
ITypeShape<T>The generic shape representation.
state
objectThe state to be passed to the generic function.
Returns
- object
The result of the generic function.
Type Parameters
T
The type represented by
typeShape
.