Table of Contents

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

TUnionCase

The type of the union case.

TUnion

The 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.

Type

Gets the underlying type shape of the union case.

ITypeShape<TUnionCase> Type { get; }

Property Value

ITypeShape<TUnionCase>