Skip to content

Assembly Attributes

There are assembly-level attributes that can be applied to your source generator assembly to enable polyfills for certain features:

  • EnableRecordSupport - Enables support for C# 9 record types in your source generator assembly
  • EnableRequiredSupport - Enables support for C# 11 required members in your source generator assembly

When applied, they will emit polyfills for the features in your source generator assembly.

AssemblyInfo.cs
using Hertzole.SourceGen;
[assembly: EnableRecordSupport]
[assembly: EnableRequiredSupport]