Table of Contents

Class SourceGenPropertyShape<TDeclaringType, TPropertyType>

Namespace
PolyType.SourceGenModel
Assembly
PolyType.dll

Source generator model for a property shape.

public sealed class SourceGenPropertyShape<TDeclaringType, TPropertyType> : IPropertyShape<TDeclaringType, TPropertyType>, IPropertyShape

Type Parameters

TDeclaringType

The declaring type of the property.

TPropertyType

The type of the property value.

Inheritance
SourceGenPropertyShape<TDeclaringType, TPropertyType>
Implements
IPropertyShape<TDeclaringType, TPropertyType>
Inherited Members

Properties

AttributeProviderFunc

Gets the custom attribute provider for the property.

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>

Getter

Gets the getter delegate for the property.

public Getter<TDeclaringType, TPropertyType>? Getter { get; init; }

Property Value

Getter<TDeclaringType, TPropertyType>

IsField

Gets a value indicating whether the shape represents a field.

public bool IsField { get; init; }

Property Value

bool

IsGetterNonNullable

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

public required bool IsGetterNonNullable { get; init; }

Property Value

bool

IsGetterPublic

Gets a value indicating whether the getter is declared public.

public required bool IsGetterPublic { get; init; }

Property Value

bool

IsSetterNonNullable

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

public required bool IsSetterNonNullable { get; init; }

Property Value

bool

IsSetterPublic

Gets a value indicating whether the setter is declared public.

public required bool IsSetterPublic { get; init; }

Property Value

bool

Name

Gets the name of the property.

public required string Name { get; init; }

Property Value

string

PropertyType

Gets the shape of the property type.

public required ITypeShape<TPropertyType> PropertyType { get; init; }

Property Value

ITypeShape<TPropertyType>

Setter

Gets the setter delegate for the property.

public Setter<TDeclaringType, TPropertyType>? Setter { get; init; }

Property Value

Setter<TDeclaringType, TPropertyType>