Transitio.Mediator
1.1.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Transitio.Mediator --version 1.1.0
NuGet\Install-Package Transitio.Mediator -Version 1.1.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="Transitio.Mediator" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Transitio.Mediator" Version="1.1.0" />
<PackageReference Include="Transitio.Mediator" />
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 Transitio.Mediator --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Transitio.Mediator, 1.1.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 Transitio.Mediator@1.1.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=Transitio.Mediator&version=1.1.0
#tool nuget:?package=Transitio.Mediator&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Transitio
Transitio is a lightweight, high-performance object mapping framework for .NET with support for profiles, nested mapping, dependency injection, object validation and an in-process mediator.
๐ฆ Installation
dotnet add package Transitio.Mapper
# optional: Microsoft.Extensions.DependencyInjection integration
dotnet add package Transitio.Dependency
# optional: standalone object validation
dotnet add package Transitio.Validation
# optional: standalone in-process mediator
dotnet add package Transitio.Mediator
๐ Quick start
using Transitio.Mapper;
public class User { public string Name { get; set; } = ""; public int Age { get; set; } }
public class UserDto { public string Name { get; set; } = ""; public int Age { get; set; } }
var config = new TransitioMapperConfiguration(cfg =>
{
cfg.CreateMap<User, UserDto>();
});
IMapper mapper = config.BuildMapper();
var dto = mapper.Map<UserDto>(new User { Name = "Hitesh", Age = 30 });
// dto.Name == "Hitesh", dto.Age == 30
Using dependency injection? Register with services.AddTransitio(...) and inject IMapper.
See the Getting Started guide.
โจ Features
- โก Expression-based high-performance mapping
- ๐งฉ Profiles for modular configuration
- ๐ Nested object mapping (including nested collection properties)
- ๐ฆ Collection mapping (List โ List, IEnumerable โ array, IEnumerable โ interface)
- ๐งต Thread-safe: a single mapper instance can be shared as a singleton
- ๐ง Custom member mapping,
Ignore,
Conditional mapping,
and Reverse mapping - ๐ Full object transformation with
ConvertUsing(...)(type / instance / delegate)
and context-aware mapping viaIMappingContext - ๐งฌ Inheritance & reuse with
Include/IncludeBase - ๐งช Null-value handling
and configuration validation - ๐ฆ Dependency injection: assembly scanning, configurable lifetimes
(scoped converters), fail-fast validation, and keyed mappers - โ
Object validation with the standalone
Transitio.Validationpackage (fluent rules,ValidationResult, DI registration) - ๐จ Mediator with the standalone
Transitio.Mediatorpackage (request/response, notifications, pipeline behaviors, DI registration) - ๐ฏ Supports .NET 8 & .NET 10
๐ Documentation
- Getting Started โ install, first map, mapping rules
- Core Mapping Features โ
ForMember,Ignore,Condition,ReverseMap, nested & collection mapping, null handling, validation - Full Object Transformation โ
ConvertUsing(type / instance / delegate) andIMappingContext - Inheritance & Reusability โ
Include/IncludeBase - Dependency Injection โ
AddTransitio, assembly scanning, lifetimes, validation, keyed mappers - Object Validation -
AbstractValidator<T>,RuleFor, built-in rules,AddTransitioValidation - Mediator -
IRequest/IRequestHandler,INotification/INotificationHandler,IPipelineBehavior,AddTransitioMediatorA runnable end-to-end demo lives insamples/BasicSample.
See the Changelog for release history.
๐ค Maintainers
Maintained by the Transitio
๐ License
This project is licensed under the MIT License
| 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 is compatible. 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.
-
net10.0
-
net8.0
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.