Getting Started
Installation
Section titled “Installation”You can install the project from NuGet:
dotnet add package Hertzole.SourceGenUtilsOr as a package reference:
<PackageReference Include="Hertzole.SourceGenUtils" Version="*" />All generated types live in the Hertzole.SourceGen namespace.
Quick Example
Section titled “Quick Example”using Hertzole.SourceGen;
using var writer = new CodeWriter();writer .AppendNamespace("MyApp.Models") .AppendLine("public class User");
using (writer.WithBlock()){ writer.AppendLine("public string Name { get; set; }");}
Console.WriteLine(writer.ToString());Dispose CodeWriter (and pools/scopes) to return buffers. See the API reference for details.