FluentScrutor 1.0.0

dotnet add package FluentScrutor --version 1.0.0
                    
NuGet\Install-Package FluentScrutor -Version 1.0.0
                    
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="FluentScrutor" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FluentScrutor" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="FluentScrutor" />
                    
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 FluentScrutor --version 1.0.0
                    
#r "nuget: FluentScrutor, 1.0.0"
                    
#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 FluentScrutor@1.0.0
                    
#: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=FluentScrutor&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=FluentScrutor&version=1.0.0
                    
Install as a Cake Tool

FluentScrutor

NuGet Version License: MIT

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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