Interface IUnionCaseShape<TUnionCase, TUnion>
- Namespace
- PolyType.Abstractions
- Assembly
- PolyType.dll
Provides a strongly typed shape model for a union case in a discriminated union type.
public interface IUnionCaseShape<TUnionCase, TUnion> : IUnionCaseShape
Type Parameters
TUnionCaseThe type of the union case.
TUnionThe type of the underlying union.
- Inherited Members
Properties
Marshaler
Gets a bidirectional mapper between TUnionCase and TUnion.
IMarshaler<TUnionCase, TUnion> Marshaler { get; }
Property Value
- IMarshaler<TUnionCase, TUnion>
Remarks
Converting from TUnionCase to TUnion is a reversible operation,
however mapping from TUnion to TUnionCase can fail if the
value is not a member of the current union case.
UnionCaseType
Gets the underlying type shape of the union case.
ITypeShape<TUnionCase> UnionCaseType { get; }
Property Value
- ITypeShape<TUnionCase>