Class ShapeExtensions
- Namespace
- PolyType.Abstractions
- Assembly
- PolyType.dll
Extension methods for the various type shape interfaces.
public static class ShapeExtensions
- Inheritance
-
ShapeExtensions
- Inherited Members
Methods
GetDefaultConstructor(IObjectTypeShape)
Retrieves the default constructor for the given type shape, if available.
public static Func<object>? GetDefaultConstructor(this IObjectTypeShape shape)
Parameters
shape
IObjectTypeShapeThe type's object shape.
Returns
GetDefaultConstructor<T>(IObjectTypeShape<T>)
Retrieves the default constructor for the given type shape, if available.
public static Func<T>? GetDefaultConstructor<T>(this IObjectTypeShape<T> shape)
Parameters
shape
IObjectTypeShape<T>The type's object shape.
Returns
Type Parameters
T
The type to be constructed.