Table of Contents

Interface IConstructorShape

Namespace
PolyType.Abstractions
Assembly
PolyType.dll

Provides a strongly typed shape model for a given .NET constructor.

public interface IConstructorShape

Properties

AttributeProvider

Gets the provider used for method-level attribute resolution.

ICustomAttributeProvider? AttributeProvider { get; }

Property Value

ICustomAttributeProvider

DeclaringType

Gets the shape of the declaring type for the constructor.

IObjectTypeShape DeclaringType { get; }

Property Value

IObjectTypeShape

IsPublic

Gets a value indicating whether the constructor is declared public.

bool IsPublic { get; }

Property Value

bool

Parameters

Gets the shapes of the parameters accepted by the constructor.

IReadOnlyList<IConstructorParameterShape> Parameters { get; }

Property Value

IReadOnlyList<IConstructorParameterShape>

Remarks

Includes all formal parameters of the underlying constructor, as well as any member that can be specified in a member initializer expression.

Methods

Accept(ITypeShapeVisitor, object?)

Accepts an ITypeShapeVisitor for strongly-typed traversal.

object? Accept(ITypeShapeVisitor visitor, object? state = null)

Parameters

visitor ITypeShapeVisitor

The visitor to accept.

state object

The state parameter to pass to the underlying visitor.

Returns

object

The object result returned by the visitor.