Table of Contents

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
SourceGenObjectTypeShape<TObject>
Implements
ITypeShape<TObject>
Inherited Members
Extension Methods

Properties

ConstructorFactory

Gets the factory method for creating constructor shapes.

public Func<IConstructorShape>? ConstructorFactory { get; init; }

Property Value

Func<IConstructorShape>

IsRecordType

Gets a value indicating whether the current shape represents a C# record type.

public bool IsRecordType { get; init; }

Property Value

bool

IsTupleType

Gets a value indicating whether the current shape represents a tuple type, either Tuple or ValueTuple.

public bool IsTupleType { get; init; }

Property Value

bool

Kind

Gets determines the TypeShapeKind that the current shape supports.

public override TypeShapeKind Kind { get; }

Property Value

TypeShapeKind

PropertiesFactory

Gets the factory method for creating property shapes.

public Func<IEnumerable<IPropertyShape>>? PropertiesFactory { get; init; }

Property Value

Func<IEnumerable<IPropertyShape>>

Methods

Accept(TypeShapeVisitor, object?)

Accepts a TypeShapeVisitor for type graph traversal.

public override object? Accept(TypeShapeVisitor visitor, object? state = null)

Parameters

visitor TypeShapeVisitor

The visitor to accept.

state object

The state parameter to pass to the underlying visitor.

Returns

object

The object result returned by the visitor.