Class GenerateShapeAttribute
- Namespace
- PolyType
- Assembly
- PolyType.dll
Instructs the PolyType source generator to include the annotated type in the ITypeShapeProvider that it generates.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Interface, AllowMultiple = false, Inherited = false)]
public sealed class GenerateShapeAttribute : Attribute
- Inheritance
-
GenerateShapeAttribute
- Inherited Members
Remarks
For projects targeting .NET 8 or later, this additionally augments the type with an implementation of IShapeable for the type.
Projects targeting older versions of .NET need to access the generated ITypeShapeProvider instance through the static property added to classes annotated with the GenerateShapeAttribute<T>.