Table of Contents

Class SourceGenTypeShape<T>

Namespace
PolyType.SourceGenModel
Assembly
PolyType.dll

Source generator model for type shapes.

public abstract class SourceGenTypeShape<T> : ITypeShape<T>, ITypeShape

Type Parameters

T

The type that the shape describes.

Inheritance
SourceGenTypeShape<T>
Implements
Derived
Inherited Members

Properties

AttributeFactory

Gets the factory method for creating the custom attribute provider of the type.

public Func<SourceGenAttributeInfo[]>? AttributeFactory { get; init; }

Property Value

Func<SourceGenAttributeInfo[]>

EventsFactory

Gets the factory method for creating event shapes.

public Func<IEnumerable<IEventShape>>? EventsFactory { get; init; }

Property Value

Func<IEnumerable<IEventShape>>

GetAssociatedTypeShape

Gets the function that looks up associated type shapes by type.

public Func<Type, ITypeShape?>? GetAssociatedTypeShape { get; init; }

Property Value

Func<Type, ITypeShape>

Kind

Gets determines the TypeShapeKind that the current shape supports.

public abstract TypeShapeKind Kind { get; }

Property Value

TypeShapeKind

MethodsFactory

Gets the factory method for creating method shapes.

public Func<IEnumerable<IMethodShape>>? MethodsFactory { get; init; }

Property Value

Func<IEnumerable<IMethodShape>>

Provider

Gets the provider used to generate this instance.

public required ITypeShapeProvider Provider { get; init; }

Property Value

ITypeShapeProvider

Methods

Accept(TypeShapeVisitor, object?)

Accepts a TypeShapeVisitor for type graph traversal.

public abstract 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.