FluentScrutor 1.0.0
dotnet add package FluentScrutor --version 1.0.0
NuGet\Install-Package FluentScrutor -Version 1.0.0
<PackageReference Include="FluentScrutor" Version="1.0.0" />
<PackageVersion Include="FluentScrutor" Version="1.0.0" />
<PackageReference Include="FluentScrutor" />
paket add FluentScrutor --version 1.0.0
#r "nuget: FluentScrutor, 1.0.0"
#:package FluentScrutor@1.0.0
#addin nuget:?package=FluentScrutor&version=1.0.0
#tool nuget:?package=FluentScrutor&version=1.0.0
FluentScrutor
A lightweight .NET library providing a convenient fluent API for registering decorator chains using the popular Scrutor library. It simplifies configuring the base service lifetime and helps prevent common configuration errors.
Overview
While Scrutor provides powerful decoration capabilities, registering multiple decorators and configuring the base service can sometimes involve repetitive code. FluentScrutor
wraps Scrutor's decoration features in an intuitive, chainable API, making your dependency injection setup cleaner and more readable.
Features
- Fluent Interface: Register base services and multiple decorators using a clear, chainable syntax.
- Lifetime Configuration: Easily configure the
ServiceLifetime
(Singleton
,Scoped
,Transient
) for the base service implementation within the fluent chain. - Duplicate Prevention: Automatically prevents adding the same decorator type multiple times to a single decoration chain, throwing an exception to catch potential mistakes early.
- Thread-Safe Configuration: The builder used during configuration is thread-safe.
- Built on Scrutor: Leverages the robust and tested decoration mechanism provided by Scrutor.
- Modern .NET: Designed for use with
Microsoft.Extensions.DependencyInjection
in modern .NET applications.
Requirements
- .NET 8.0 SDK or later (The library uses C# 12 features like primary constructors and collection expressions).
- Scrutor NuGet package (Tested with v6.x, ensure compatibility).
Microsoft.Extensions.DependencyInjection.Abstractions
(This is typically included when using ASP.NET Core or .NET Generic Host).
Installation
Install the package via the .NET CLI:
dotnet add package FluentScrutor
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.3)
- Scrutor (>= 6.0.1)
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.0 | 175 | 3/31/2025 |