Datacute.IncrementalGeneratorExtensions
1.0.5
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
<PackageReference Include="Datacute.IncrementalGeneratorExtensions" Version="1.0.5"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Datacute.IncrementalGeneratorExtensions" Version="1.0.5" />
<PackageReference Include="Datacute.IncrementalGeneratorExtensions"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Datacute.IncrementalGeneratorExtensions --version 1.0.5
#r "nuget: Datacute.IncrementalGeneratorExtensions, 1.0.5"
#:package Datacute.IncrementalGeneratorExtensions@1.0.5
#addin nuget:?package=Datacute.IncrementalGeneratorExtensions&version=1.0.5
#tool nuget:?package=Datacute.IncrementalGeneratorExtensions&version=1.0.5
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 whatImmutableArray<T>
uses. - Incremental source generators produce new
ImmutableArray<T>
outputs within their pipelines, and by converting these toEquatableImmutableArray<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 theTypeContext
of the type marked by the attribute, and theTypeContext
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 aStringBuilder
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.
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.
See full release notes and changelog: https://github.com/datacute/IncrementalGeneratorExtensions/blob/main/CHANGELOG.md