Class SourceGenObjectTypeShape<TObject>
- Namespace
- PolyType.SourceGenModel
- Assembly
- PolyType.dll
Source generator model for object type shapes.
public sealed class SourceGenObjectTypeShape<TObject> : SourceGenTypeShape<TObject>, IObjectTypeShape<TObject>, ITypeShape<TObject>, IObjectTypeShape, ITypeShape
Type Parameters
TObject
The type whose shape is described.
- Inheritance
-
SourceGenTypeShape<TObject>SourceGenObjectTypeShape<TObject>
- Implements
-
IObjectTypeShape<TObject>ITypeShape<TObject>
- Inherited Members
- Extension Methods
Properties
CreateConstructorFunc
Gets the factory method for creating constructor shapes.
public Func<IConstructorShape>? CreateConstructorFunc { get; init; }
Property Value
CreatePropertiesFunc
Gets the factory method for creating property shapes.
public Func<IEnumerable<IPropertyShape>>? CreatePropertiesFunc { get; init; }
Property Value
IsRecordType
Gets a value indicating whether the type represents a record.
public required bool IsRecordType { get; init; }
Property Value
IsTupleType
Gets a value indicating whether the type represents a tuple.
public required bool IsTupleType { get; init; }
Property Value
Kind
Gets the TypeShapeKind that the current shape supports.
public override TypeShapeKind Kind { get; }
Property Value
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.