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

CreateConstructorFunc

Gets the factory method for creating constructor shapes.

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

Property Value

Func<IConstructorShape>

CreatePropertiesFunc

Gets the factory method for creating property shapes.

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

Property Value

Func<IEnumerable<IPropertyShape>>

IsRecordType

Gets a value indicating whether the type represents a record.

public required bool IsRecordType { get; init; }

Property Value

bool

IsTupleType

Gets a value indicating whether the type represents a tuple.

public required bool IsTupleType { get; init; }

Property Value

bool

Kind

Gets the TypeShapeKind that the current shape supports.

public override TypeShapeKind Kind { get; }

Property Value

TypeShapeKind

Methods

Accept(TypeShapeVisitor, object?)

Accepts an TypeShapeVisitor for strongly-typed 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.