Class SourceGenEnumTypeShape<TEnum, TUnderlying>
- Namespace
- PolyType.SourceGenModel
- Assembly
- PolyType.dll
Source generator model for enum shapes.
public sealed class SourceGenEnumTypeShape<TEnum, TUnderlying> : SourceGenTypeShape<TEnum>, IEnumTypeShape<TEnum, TUnderlying>, ITypeShape<TEnum>, IEnumTypeShape, ITypeShape where TEnum : struct, Enum
Type Parameters
TEnum
The type of the enum.
TUnderlying
The type of the underlying type of the enum.
- Inheritance
-
SourceGenTypeShape<TEnum>SourceGenEnumTypeShape<TEnum, TUnderlying>
- Implements
-
IEnumTypeShape<TEnum, TUnderlying>ITypeShape<TEnum>
- Inherited Members
Properties
Kind
Gets the TypeShapeKind that the current shape supports.
public override TypeShapeKind Kind { get; }
Property Value
UnderlyingType
Gets the shape of the underlying type of the enum.
public required ITypeShape<TUnderlying> UnderlyingType { get; init; }
Property Value
- ITypeShape<TUnderlying>
Methods
Accept(TypeShapeVisitor, object?)
Accepts an TypeShapeVisitor for strongly-typed traversal.
public override object? Accept(TypeShapeVisitor visitor, object? state = null)
Parameters
visitor
TypeShapeVisitorThe visitor to accept.
state
objectThe state parameter to pass to the underlying visitor.