TimeWarp.SourceGenerators
1.0.0-beta.7
Prefix Reserved
dotnet add package TimeWarp.SourceGenerators --version 1.0.0-beta.7
NuGet\Install-Package TimeWarp.SourceGenerators -Version 1.0.0-beta.7
<PackageReference Include="TimeWarp.SourceGenerators" Version="1.0.0-beta.7" />
<PackageVersion Include="TimeWarp.SourceGenerators" Version="1.0.0-beta.7" />
<PackageReference Include="TimeWarp.SourceGenerators" />
paket add TimeWarp.SourceGenerators --version 1.0.0-beta.7
#r "nuget: TimeWarp.SourceGenerators, 1.0.0-beta.7"
#:package TimeWarp.SourceGenerators@1.0.0-beta.7
#addin nuget:?package=TimeWarp.SourceGenerators&version=1.0.0-beta.7&prerelease
#tool nuget:?package=TimeWarp.SourceGenerators&version=1.0.0-beta.7&prerelease
TimeWarp.SourceGenerators
TimeWarp.SourceGenerators is our collection of source generators.
Give a Star! ⭐
If you like or are using this project please give it a star. Thank you!
Features
Interface Delegation Generator
Implements Delphi-style interface delegation for C#. Mark fields or properties with [Implements] to automatically generate forwarding methods for interface members.
Usage
public partial class DataService : ILogger, IDataProcessor<string>
{
[Implements]
private readonly ILogger Logger;
[Implements]
private readonly IDataProcessor<string> Processor;
public DataService(ILogger logger, IDataProcessor<string> processor)
{
Logger = logger;
Processor = processor;
}
// Optionally override specific methods
public string Process(string input)
{
// Custom implementation
return Processor.Process(input.ToUpper());
}
}
The generator will automatically create forwarding implementations for all interface methods and properties, except those you explicitly implement.
Requirements
- Class must be marked as
partial - Class must implement the interface being delegated
- Field/property type must be the interface or implement the interface
Diagnostics
- TW1001: Class must be partial for interface delegation
- TW1002: Class does not implement the delegated interface
- TW1003: Multiple fields delegate the same interface
File Name Rule Analyzer
Enforces kebab-case naming convention for C# files.
Configuration
Configure exceptions in .editorconfig:
[*.cs]
dotnet_diagnostic.TWA001.excluded_files = Program.cs;Startup.cs;*.Designer.cs
Getting started
To quickly get started I recommend reviewing the samples in this repo.
Installation
dotnet add package TimeWarp.SourceGenerators
You can see the latest NuGet packages from the official TimeWarp NuGet page.
Releases
See the Release Notes
Unlicense
Contributing
Time is of the essence. Before developing a Pull Request I recommend opening a discussion.
Please feel free to make suggestions and help out with the documentation. Please refer to Markdown for how to write markdown files.
Contact
Sometimes the github notifications get lost in the shuffle. If you file an issue and don't get a response in a timely manner feel free to ping on our Discord server.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Microsoft.CodeAnalysis.CSharp (>= 4.11.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on TimeWarp.SourceGenerators:
| Package | Downloads |
|---|---|
|
TimeWarp.OptionsValidation
Integrates FluentValidation with Microsoft.Extensions.Options for configuration validation at startup. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on TimeWarp.SourceGenerators:
| Repository | Stars |
|---|---|
|
TimeWarpEngineering/timewarp-state
A Blazor State management library by TimeWarp.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-beta.7 | 120 | 10/17/2025 |
| 1.0.0-beta.6 | 89 | 10/17/2025 |
| 1.0.0-beta.5 | 98 | 10/17/2025 |
| 1.0.0-beta.4 | 186 | 8/21/2025 |
| 1.0.0-beta.3 | 70 | 8/2/2025 |
| 1.0.0-beta.2 | 44 | 8/2/2025 |
| 1.0.0-beta.1 | 49 | 8/2/2025 |
| 1.0.0-alpha.8 | 111 | 11/23/2024 |
| 1.0.0-alpha.7 | 76 | 11/23/2024 |
| 1.0.0-alpha.5 | 141 | 11/20/2022 |
| 1.0.0-alpha.4 | 103 | 11/20/2022 |
| 1.0.0-alpha.3 | 195 | 11/8/2022 |
| 1.0.0-alpha.2 | 98 | 11/8/2022 |
| 1.0.0-alpha.1 | 102 | 11/8/2022 |
For detailed release notes and changelog, please visit: https://github.com/TimeWarpEngineering/timewarp-source-generators/releases