Table of Contents

Class ReflectionTypeShapeProvider

Namespace
PolyType.ReflectionProvider
Assembly
PolyType.dll

Provides a ITypeShapeProvider implementation that uses reflection.

public class ReflectionTypeShapeProvider : ITypeShapeProvider
Inheritance
ReflectionTypeShapeProvider
Implements
Inherited Members
Extension Methods

Properties

Default

Gets the default provider instance using configuration supported by the current platform.

public static ReflectionTypeShapeProvider Default { get; }

Property Value

ReflectionTypeShapeProvider

Options

Gets the configuration used by the provider.

public ReflectionTypeShapeProviderOptions Options { get; }

Property Value

ReflectionTypeShapeProviderOptions

Methods

Create(ReflectionTypeShapeProviderOptions)

Initializes a new instance of the ReflectionTypeShapeProvider class.

public static ReflectionTypeShapeProvider Create(ReflectionTypeShapeProviderOptions options)

Parameters

options ReflectionTypeShapeProviderOptions

The options governing the shape provider instance.

Returns

ReflectionTypeShapeProvider

A ReflectionTypeShapeProviderOptions corresponding to the specified options.

GetShape(Type)

Gets a ITypeShape instance corresponding to the supplied type.

public ITypeShape GetShape(Type type)

Parameters

type Type

The type for which a shape is requested.

Returns

ITypeShape

A ITypeShape instance corresponding to the current type.

Exceptions

ArgumentNullException

The type argument is null.

ArgumentException

The type cannot be a generic argument.

GetShape<T>()

Gets a ITypeShape<T> instance corresponding to the supplied type.

public ITypeShape<T> GetShape<T>()

Returns

ITypeShape<T>

A ITypeShape<T> instance corresponding to the current type.

Type Parameters

T

The type for which a shape is requested.