Forma.Decorator 1.1.2

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

Forma

<div align="center"> <img src="assets/forma-icon.svg" alt="Forma Logo" width="200"> </div>

Forma is a lightweight and modular .NET library that provides abstractions and infrastructure for implementing common behavioral design patterns such as Mediator, Decorator, Pipeline, and more.

Build composable, decoupled, and maintainable application flows using clean architectural principles.

Build and Test

NuGet Packages

Forma.Core Forma.Core PreRelease

Forma.Mediator Forma.Mediator PreRelease

Forma.Decorator Forma.Decorator PreRelease

Forma.Chains Forma.Chains PreRelease

Forma.PubSub.InMemory Forma.PubSub.InMemory PreRelease


✨ Features

  • ✅ Abstract and extensible interfaces (IMediator, IRequestHandler, IPipelineBehavior, IDecorator, etc.)
  • ✅ Built-in support for request/response messaging (Mediator Pattern)
  • ✅ Seamless integration with .NET Dependency Injection
  • ✅ Auto-registration of handlers and behaviors via reflection
  • ✅ Support for custom pipeline behaviors (e.g. logging, retry, caching)
  • ✅ Zero dependencies in the core package

📦 Installation

Available on NuGet.org:

# Core components
dotnet add package Forma.Core
dotnet add package Forma.Mediator
dotnet add package Forma.Decorator

# Additional components
dotnet add package Forma.Chains
dotnet add package Forma.PubSub.InMemory

Benchmark

Method Categories Mean Error StdDev Median Rank
Forma_RequestWithResponse RequestWithResponse 334.8 ns 6.23 ns 10.92 ns 332.0 ns 1
MediatR_RequestWithResponse RequestWithResponse 492.4 ns 9.54 ns 10.98 ns 491.9 ns 2
Forma_SendAsync_object SendAsObject 335.7 ns 6.46 ns 8.63 ns 335.2 ns 1
MediatR_Send_object SendAsObject 452.4 ns 9.31 ns 26.25 ns 441.3 ns 2
Forma_SimpleRequest SimpleRequest 283.0 ns 5.50 ns 5.40 ns 282.7 ns 1
MediatR_SimpleRequest SimpleRequest 412.1 ns 7.47 ns 10.71 ns 408.1 ns 2

🛠 Development

Requirements

  • .NET 9.0 SDK or higher
  • Visual Studio 2025 or other .NET-compatible IDE

Useful Commands

# Build the project
dotnet build

# Run tests
dotnet test

# Run benchmarks
dotnet run -c Release --project src/Forma.Benchmarks/Forma.Benchmarks.csproj

📋 Documentation

🚀 Release Process

Forma uses a hybrid approach for releasing its NuGet packages:

  • Core Releases (Forma.Core, Forma.Mediator, Forma.Decorator): Released together with the same version
  • Component Releases (Forma.Chains, Forma.PubSub.InMemory): Released independently

For more information on the release process, see the Release Guide.

👥 Contributing

Contributions are welcome! If you'd like to contribute to Forma:

  1. Fork the repository
  2. Create a branch for your feature (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Before contributing, please review the development documentation in the docs/ folder.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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.1.2 364 7/21/2025
1.0.10-g74bc3c401b 183 7/20/2025
1.0.0-preview-0004 356 7/21/2025
1.0.0-preview-0003 270 7/20/2025
1.0.0-preview-0002 268 7/20/2025