Table of Contents

Interface IUnionTypeShape

Namespace
PolyType.Abstractions
Assembly
PolyType.dll

Provides a strongly typed shape model for a .NET type encoding a discriminated union.

public interface IUnionTypeShape : ITypeShape
Inherited Members

Remarks

Typically reserved for classes or interfaces that specify derived types via the DerivedTypeShapeAttribute but can also include F# discriminated unions.

Properties

BaseType

Gets the underlying type shape of the union base type.

ITypeShape BaseType { get; }

Property Value

ITypeShape

Remarks

Typically used as the fallback case for values not matching any of the union cases.

UnionCases

Gets the list of all registered union case shapes.

IReadOnlyList<IUnionCaseShape> UnionCases { get; }

Property Value

IReadOnlyList<IUnionCaseShape>