Class TypeShapeProviderAttribute
- Namespace
- PolyType.Abstractions
- Assembly
- PolyType.dll
Links the declared type to a specific ITypeShapeProvider implementation.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Interface, AllowMultiple = false, Inherited = false)]
public sealed class TypeShapeProviderAttribute : Attribute
- Inheritance
-
TypeShapeProviderAttribute
- Inherited Members
Remarks
Used by the source generator as a substitute for the IShapeable<T> interface in targets where static abstract interface members are not available.
Constructors
TypeShapeProviderAttribute(Type)
Initializes a new instance of the TypeShapeProviderAttribute class.
public TypeShapeProviderAttribute(Type typeShapeProvider)
Parameters
typeShapeProvider
TypeThe linked type shape provider implementation.
Remarks
The parameter typeShapeProvider
should expose a public
parameterless constructor and implement ITypeShapeProvider.
Properties
TypeShapeProvider
The linked type implementing ITypeShapeProvider.
public Type TypeShapeProvider { get; }