Class SourceGenSurrogateTypeShape<T, TSurrogate>
- Namespace
- PolyType.SourceGenModel
- Assembly
- PolyType.dll
Source generator model for surrogate type shapes.
public sealed class SourceGenSurrogateTypeShape<T, TSurrogate> : SourceGenTypeShape<T>, ISurrogateTypeShape<T, TSurrogate>, ITypeShape<T>, ISurrogateTypeShape, ITypeShape
Type Parameters
T
The type that the shape describes.
TSurrogate
The surrogate type used by the shape.
- Inheritance
-
SourceGenSurrogateTypeShape<T, TSurrogate>
- Implements
-
ISurrogateTypeShape<T, TSurrogate>ITypeShape<T>
- Inherited Members
Properties
Kind
Gets determines the TypeShapeKind that the current shape supports.
public override TypeShapeKind Kind { get; }
Property Value
Marshaler
Gets a bidirectional mapper between T
and TSurrogate
.
public required IMarshaler<T, TSurrogate> Marshaler { get; init; }
Property Value
- IMarshaler<T, TSurrogate>
SurrogateType
Gets the shape of the element type of the nullable.
public required ITypeShape<TSurrogate> SurrogateType { get; init; }
Property Value
- ITypeShape<TSurrogate>
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.