Table of Contents

Namespace PolyType.Abstractions

Classes

AssociatedTypeAttributeAttribute

An attribute to apply to other attribute classes that accept one or more Type arguments that should be considered associated types to whatever type the other attribute is applied to.

TypeShapeExtensions

Extension methods for the various type shape interfaces.

TypeShapeProviderAttribute

Links the declared type to a specific ITypeShapeProvider implementation.

TypeShapeResolver

Defines helpers methods used for resolving ITypeShape instances from source generated types.

TypeShapeVisitor

Provides a visitor for strongly-typed traversal of .NET types.

Structs

CollectionConstructionOptions<TKey>

Options for constructing collections.

Unit

Defines a type inhabited by a single value.

Interfaces

IArgumentState

Declares list of arguments to be passed to a parameterized constructor or method.

IConstructorShape

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

IConstructorShape<TDeclaringType, TArgumentState>

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

IDictionaryTypeShape

Provides a strongly typed shape model for a .NET type that is a dictionary.

IDictionaryTypeShape<TDictionary, TKey, TValue>

Provides a strongly typed shape model for a .NET type that is a dictionary.

IEnumTypeShape

Provides a strongly typed shape model for a .NET enum.

IEnumTypeShape<TEnum, TUnderlying>

Provides a strongly typed shape model for a .NET enum.

IEnumerableTypeShape

Provides a strongly typed shape model for a .NET type that is enumerable.

IEnumerableTypeShape<TEnumerable, TElement>

Provides a strongly typed shape model for a .NET type that is enumerable.

IEventShape

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

IEventShape<TDeclaringType, TEventHandler>

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

IFunctionTypeShape

Provides a strongly typed shape model for function types.

IFunctionTypeShape<TFunction, TArgumentState, TResult>

Provides a strongly typed shape model for function types.

IMethodShape

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

IMethodShape<TDeclaringType, TArgumentState, TResult>

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

IObjectTypeShape

Provides a strongly typed shape model for a .NET object.

IObjectTypeShape<T>

Provides a strongly typed shape model for a .NET object.

IOptionalTypeShape

Provides a strongly typed shape model for optional types.

IOptionalTypeShape<TOptional, TElement>

Provides a strongly typed shape model for optional types.

IParameterShape

Provides a strongly typed shape model for a given .NET method parameter, representing either an actual parameter or a member initializer.

IParameterShape<TArgumentState, TParameterType>

Provides a strongly typed shape model for a given .NET method parameter, representing either an actual method parameter or a required or init-only property.

IPropertyShape

Provides a strongly typed shape model for a given .NET instance property or field.

IPropertyShape<TDeclaringType, TPropertyType>

Provides a strongly typed shape model for a given .NET instance property or field.

ISurrogateTypeShape

Provides a strongly typed shape model for a .NET type that employs a surrogate type.

ISurrogateTypeShape<T, TSurrogate>

Provides a strongly typed shape model for a .NET type that employs a surrogate type.

ITypeShapeFunc

A generic function used to unpack ITypeShape instances.

IUnionCaseShape

Provides a strongly typed shape model for a union case in a discriminated union type.

IUnionCaseShape<TUnionCase, TUnion>

Provides a strongly typed shape model for a union case in a discriminated union type.

IUnionTypeShape

Provides a strongly typed shape model for a .NET type encoding a discriminated union.

IUnionTypeShape<TUnion>

Provides a strongly typed shape model for a .NET type encoding a discriminated union.

Enums

CollectionComparerOptions

The kinds of comparers that may be supplied to a collection's constructor.

CollectionConstructionStrategy

The construction strategy use for a given IEnumerableTypeShape or IDictionaryTypeShape.

DictionaryInsertionMode

Specifies insertion behavior for a mutable dictionary type.

ParameterKind

Specifies the kind of method parameter.

Delegates

Constructor<TArgumentState, TDeclaringType>

Delegate representing a parameterized constructor.

DictionaryInserter<TDictionary, TKey, TValue>

Delegate that inserts a key-value pair into a mutable dictionary.

EnumerableAppender<TEnumerable, TElement>

Delegate that appends an element to a mutable enumerable collection.

Getter<TDeclaringType, TPropertyType>

Delegate representing a property/field getter.

MethodInvoker<TDeclaringType, TArgumentState, TResult>

Delegate representing a parameterized method invocation.

MutableCollectionConstructor<TKey, TDeclaringType>

Delegate representing a default constructor for a mutable collection.

OptionDeconstructor<TOptional, TElement>

Delegate deconstructing an optional type.

ParameterizedCollectionConstructor<TKey, TElement, TDeclaringType>

Delegate that constructs a collection from a span of values.

RefFunc<T, TResult>

Delegate representing a function that takes a single argument by reference and returns a value.

Setter<TDeclaringType, TPropertyType>

Delegate representing a property/field setter.