Table of Contents

Class SourceGenParameterShape<TArgumentState, TParameter>

Namespace
PolyType.SourceGenModel
Assembly
PolyType.dll

Source generator model for a constructor parameter shape.

public sealed class SourceGenParameterShape<TArgumentState, TParameter> : IParameterShape<TArgumentState, TParameter>, IParameterShape

Type Parameters

TArgumentState

The mutable constructor argument state type.

TParameter

The constructor parameter type.

Inheritance
SourceGenParameterShape<TArgumentState, TParameter>
Implements
IParameterShape<TArgumentState, TParameter>
Inherited Members

Properties

AttributeProviderFunc

Gets a constructor delegate for the custom attribute provider of the parameter.

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

Property Value

Func<ICustomAttributeProvider>

DefaultValue

Gets the default value of the parameter.

public TParameter? DefaultValue { get; init; }

Property Value

TParameter

HasDefaultValue

Gets a value indicating whether the parameter has a default value.

public bool HasDefaultValue { get; init; }

Property Value

bool

IsNonNullable

Gets a value indicating whether the parameter is non-nullable.

public required bool IsNonNullable { get; init; }

Property Value

bool

IsPublic

Gets a value indicating whether the parameter is declared public.

public required bool IsPublic { get; init; }

Property Value

bool

IsRequired

Gets a value indicating whether the parameter is required.

public required bool IsRequired { get; init; }

Property Value

bool

Kind

Gets the kind of the parameter.

public required ParameterKind Kind { get; init; }

Property Value

ParameterKind

Name

Gets the name of the parameter.

public required string Name { get; init; }

Property Value

string

ParameterType

Gets the type shape of the parameter.

public required ITypeShape<TParameter> ParameterType { get; init; }

Property Value

ITypeShape<TParameter>

Position

Gets the position of the parameter in the constructor signature.

public required int Position { get; init; }

Property Value

int

Setter

Gets the setter for the parameter.

public required Setter<TArgumentState, TParameter> Setter { get; init; }

Property Value

Setter<TArgumentState, TParameter>