Table of Contents

Class GenerateShapeAttribute<T>

Namespace
PolyType
Assembly
PolyType.dll

Instructs the PolyType source generator to include T in the ITypeShapeProvider that it generates.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple = true, Inherited = false)]
public sealed class GenerateShapeAttribute<T> : Attribute

Type Parameters

T

The type for which shape metadata will be generated.

Inheritance
GenerateShapeAttribute<T>
Inherited Members

Remarks

The source generator will include a static property in the annotated class pointing to the ITypeShapeProvider that was generated for the entire project.

For projects targeting .NET 8 or later, this will additionally augments the class with an implementation of IShapeable for T.