Datacute.IncrementalGeneratorExtensions 1.0.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package Datacute.IncrementalGeneratorExtensions --version 1.0.5
                    
NuGet\Install-Package Datacute.IncrementalGeneratorExtensions -Version 1.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Datacute.IncrementalGeneratorExtensions" Version="1.0.5">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Datacute.IncrementalGeneratorExtensions" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="Datacute.IncrementalGeneratorExtensions">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Datacute.IncrementalGeneratorExtensions --version 1.0.5
                    
#r "nuget: Datacute.IncrementalGeneratorExtensions, 1.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Datacute.IncrementalGeneratorExtensions@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Datacute.IncrementalGeneratorExtensions&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=Datacute.IncrementalGeneratorExtensions&version=1.0.5
                    
Install as a Cake Tool

Provides extension methods and helper classes designed to simplify the development of .NET Incremental Source Generators.

It adds a directory of source files directly to your project, included in your build, making it easier to package your incremental source code generator.

Features Included

SourceTextGenerator Base Class

  • Provides a base class for incremental source generators that handles the boilerplate of generating a partial class (or similar) file for an instance of a marker attribute.

EquatableImmutableArray:

  • Provides an EquatableImmutableArray<T> type which enables value-based equality comparison of array contents, rather than the reference equality of the array instance itself, which is what ImmutableArray<T> uses.
  • Incremental source generators produce new ImmutableArray<T> outputs within their pipelines, and by converting these to EquatableImmutableArray<T> instances, the pipeline stages can be correctly identified as having no changes in their output.

Attribute Context and Data

  • Adds types and extension methods to simplify collecting data about each use of a marker attribute.
  • TypeContext captures the type information.
  • AttributeContextAndData captures the attribute data, which includes the TypeContext of the type marked by the attribute, and the TypeContext of each of the containing types.
  • AttributeContextAndData has a generic type argument which is your type that holds information collected for the attribute, such as its positional and named arguments.

Indented StringBuilder:

  • Provides a customisable IndentingLineAppender class that wraps a StringBuilder and adds auto-indentation support, making it easier to generate indented source code.

Lightweight Tracing:

  • A simple tracing mechanism that integrates with the incremental source generator's WithTrackingName API, making it easier to diagnose and debug your generator's execution.
  • Usage counters and timing logs can be included as a comment in the generated source.
  • Provides an enum GeneratorStage with descriptions for common stages of the generator pipeline.
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.6 62 8/16/2025
1.0.5 80 8/3/2025
1.0.4 62 8/3/2025
1.0.3 99 7/28/2025
1.0.2 72 7/27/2025