Table of Contents

Class SourceGenUnionCaseShape<TUnionCase, TUnion>

Namespace
PolyType.SourceGenModel
Assembly
PolyType.dll

Source generator model for union case shapes.

public sealed class SourceGenUnionCaseShape<TUnionCase, TUnion> : IUnionCaseShape<TUnionCase, TUnion>, IUnionCaseShape where TUnionCase : TUnion

Type Parameters

TUnionCase

The type of the current union case.

TUnion

The type of the base union type.

Inheritance
SourceGenUnionCaseShape<TUnionCase, TUnion>
Implements
IUnionCaseShape<TUnionCase, TUnion>
Inherited Members

Properties

Index

Gets the unique index corresponding to the current union case.

public required int Index { get; init; }

Property Value

int

IsTagSpecified

Gets a value indicating whether Tag has been explicitly specified or inferred in a less stable way.

public required bool IsTagSpecified { get; init; }

Property Value

bool

Name

Gets the unique string identifier for the current union case.

public required string Name { get; init; }

Property Value

string

Tag

Gets the unique integer identifier for the current union case.

public required int Tag { get; init; }

Property Value

int

Type

Gets the underlying type shape of the union case.

public required ITypeShape<TUnionCase> Type { get; init; }

Property Value

ITypeShape<TUnionCase>