DecoWeaver 1.0.0-beta.4
See the version list below for details.
dotnet add package DecoWeaver --version 1.0.0-beta.4
NuGet\Install-Package DecoWeaver -Version 1.0.0-beta.4
<PackageReference Include="DecoWeaver" Version="1.0.0-beta.4" />
<PackageVersion Include="DecoWeaver" Version="1.0.0-beta.4" />
<PackageReference Include="DecoWeaver" />
paket add DecoWeaver --version 1.0.0-beta.4
#r "nuget: DecoWeaver, 1.0.0-beta.4"
#:package DecoWeaver@1.0.0-beta.4
#addin nuget:?package=DecoWeaver&version=1.0.0-beta.4&prerelease
#tool nuget:?package=DecoWeaver&version=1.0.0-beta.4&prerelease
DecoWeaver
Compile-time decorator registration for .NET dependency injection
DecoWeaver is a .NET incremental source generator that brings compile-time decorator registration to your dependency injection setup. Using C# 11+ interceptors, it automatically wraps your service implementations with decorators at build time—eliminating runtime reflection, assembly scanning, and manual factory wiring.
Why DecoWeaver?
- ⚡ Zero runtime overhead - No reflection or assembly scanning at startup
- 🎯 Type-safe - Catches configuration errors at compile time
- 🚀 Fast - Incremental generation with Roslyn
- 🔧 Simple - Just add
[DecoratedBy<T>]attributes - 📦 Clean - Generates readable, debuggable interceptor code
Installation
Install the NuGet package:
dotnet add package DecoWeaver --prerelease
Ensure your project uses C# 11 or later:
<PropertyGroup>
<LangVersion>11</LangVersion>
</PropertyGroup>
Quick Start
1. Mark your implementation with the decorator to apply
using DecoWeaver.Attributes;
[DecoratedBy<LoggingRepository>]
public class UserRepository : IUserRepository
{
// Your implementation
}
2. Register your service normally
services.AddScoped<IUserRepository, UserRepository>();
3. That's it!
At compile time, DecoWeaver automatically generates interceptor code that wraps UserRepository with LoggingRepository. When you resolve IUserRepository, you'll get the decorated instance.
LoggingRepository
└─ UserRepository
For more examples including open generics, multiple decorators, and ordering, see the Quick Start Guide.
Key Features
- Multiple Decorators: Stack multiple decorators with explicit ordering
- Open Generic Support: Works with
IRepository<T>,ICommand<T>, etc. - Type-Safe: Compile-time validation catches errors early
- Zero Configuration: No runtime registration or setup needed
- Debuggable: Generated code is readable and inspectable
Learn more in the Core Concepts documentation.
Requirements
- C# 11+ (for interceptors support)
- .NET 8.0+ (for keyed services)
- .NET SDK 8.0.400+ (Visual Studio 2022 17.11+)
See the Requirements page for full details.
Documentation
📖 Full Documentation - Comprehensive guides and API reference
Key sections:
- Installation - Get started with DecoWeaver
- Quick Start - Your first decorator in 5 minutes
- Core Concepts - Understand how it works
- Usage Guide - Detailed usage patterns
- Examples - Real-world scenarios
Contributing
Contributions are welcome! See our Contributing Guide for details.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ⚡ by the LayeredCraft team
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.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.11 | 375 | 3/5/2026 | |
| 1.0.5-beta.10 | 466 | 11/15/2025 | |
| 1.0.4-beta.9 | 276 | 11/14/2025 | |
| 1.0.3-beta.8 | 260 | 11/13/2025 | |
| 1.0.2-beta.7 | 270 | 11/13/2025 | |
| 1.0.1-beta.6 | 257 | 11/10/2025 | |
| 1.0.0-beta.5 | 187 | 11/6/2025 | |
| 1.0.0-beta.4 | 183 | 11/5/2025 | |
| 1.0.0-beta.3 | 180 | 11/5/2025 | |
| 1.0.0-beta.2 | 181 | 11/5/2025 | |
| 1.0.0-beta.1 | 181 | 11/5/2025 |
See the full changelog at https://layeredcraft.github.io/decoweaver/changelog/
Report issues: https://github.com/layeredcraft/decoweaver/issues