Table of Contents

Class SourceGenConstructorShape<TDeclaringType, TArgumentState>

Namespace
PolyType.SourceGenModel
Assembly
PolyType.dll

Source generator model for a constructor shape.

public sealed class SourceGenConstructorShape<TDeclaringType, TArgumentState> : IConstructorShape<TDeclaringType, TArgumentState>, IConstructorShape

Type Parameters

TDeclaringType

The type being constructed.

TArgumentState

The mutable argument state for the constructor.

Inheritance
SourceGenConstructorShape<TDeclaringType, TArgumentState>
Implements
IConstructorShape<TDeclaringType, TArgumentState>
Inherited Members

Properties

ArgumentStateConstructorFunc

Gets the argument state constructor for the constructor.

public Func<TArgumentState>? ArgumentStateConstructorFunc { get; init; }

Property Value

Func<TArgumentState>

AttributeProviderFunc

Gets the attribute provider for the constructor.

public Func<ICustomAttributeProvider?>? AttributeProviderFunc { get; init; }

Property Value

Func<ICustomAttributeProvider>

DeclaringType

Gets the shape of the declaring type.

public required IObjectTypeShape<TDeclaringType> DeclaringType { get; init; }

Property Value

IObjectTypeShape<TDeclaringType>

DefaultConstructorFunc

Gets the default constructor for the declaring type.

public Func<TDeclaringType>? DefaultConstructorFunc { get; init; }

Property Value

Func<TDeclaringType>

GetParametersFunc

Gets the parameter shapes for the constructor.

public Func<IEnumerable<IParameterShape>>? GetParametersFunc { get; init; }

Property Value

Func<IEnumerable<IParameterShape>>

IsPublic

Gets a value indicating whether the constructor is public.

public required bool IsPublic { get; init; }

Property Value

bool

ParameterCount

Gets the number of parameters the constructor takes.

public required int ParameterCount { get; init; }

Property Value

int

ParameterizedConstructorFunc

Gets the parameterized constructor for the constructor.

public Constructor<TArgumentState, TDeclaringType>? ParameterizedConstructorFunc { get; init; }

Property Value

Constructor<TArgumentState, TDeclaringType>