HostLoom.Mapping.DependencyInjection
0.11.0
See the version list below for details.
dotnet add package HostLoom.Mapping.DependencyInjection --version 0.11.0
NuGet\Install-Package HostLoom.Mapping.DependencyInjection -Version 0.11.0
<PackageReference Include="HostLoom.Mapping.DependencyInjection" Version="0.11.0" />
<PackageVersion Include="HostLoom.Mapping.DependencyInjection" Version="0.11.0" />
<PackageReference Include="HostLoom.Mapping.DependencyInjection" />
paket add HostLoom.Mapping.DependencyInjection --version 0.11.0
#r "nuget: HostLoom.Mapping.DependencyInjection, 0.11.0"
#:package HostLoom.Mapping.DependencyInjection@0.11.0
#addin nuget:?package=HostLoom.Mapping.DependencyInjection&version=0.11.0
#tool nuget:?package=HostLoom.Mapping.DependencyInjection&version=0.11.0
HostLoom.Mapping.DependencyInjection
This package registers explicit HostLoom.Mapping map classes with
Microsoft.Extensions.DependencyInjection:
services.AddHostLoomMapping(mapping =>
mapping.Add<CustomerMapper>());
The pair is inferred from the single closed IMapper<TSource, TDestination> the map class
implements, so the registration names only the class and the file needs no using for the mapped
contracts. Add<TSource, TDestination, TMapper>() states the pair explicitly, which is required
for a class implementing several pairs and for closing an open generic map.
AddUpdate<TMapper>() registers an update map — a class implementing
IUpdateMapper<TSource, TDestination>, which writes into an existing destination instead of
creating one — with the same inference, explicit-triple, factory, and instance overloads. Each
call registers exactly one contract, so a class that both creates and updates one pair goes
through Add and AddUpdate; the two are distinct services and coexist.
Each IMapper<TSource, TDestination> is transient by default. The non-generic IMapper
dispatcher is scoped and resolves closed map contracts from the current scope, so it must be
resolved from a scope rather than the root provider and cannot be injected into a singleton —
inject a closed IMapper<TSource, TDestination> there instead. The dispatcher never resolves an
update map, so inject IUpdateMapper<TSource, TDestination> directly. Registration uses closed generic
service descriptors only: there is no assembly scanning, runtime code generation, or
reflection-based map dispatch.
See the HostLoom.Mapping package README for the full API and design guidance.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- HostLoom.Mapping (>= 0.11.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
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 |
|---|---|---|
| 0.17.0 | 50 | 10/25/2026 |
| 0.16.1 | 87 | 10/22/2026 |
| 0.16.0 | 168 | 10/14/2026 |
| 0.15.1 | 111 | 10/12/2026 |
| 0.15.0 | 180 | 10/4/2026 |
| 0.14.0 | 100 | 10/4/2026 |
| 0.13.0 | 138 | 9/28/2026 |
| 0.12.0 | 128 | 9/27/2026 |
| 0.11.0 | 126 | 9/25/2026 |
| 0.10.0 | 123 | 9/22/2026 |
| 0.9.0 | 100 | 9/22/2026 |
| 0.8.0 | 136 | 9/19/2026 |
| 0.7.0 | 128 | 9/17/2026 |
| 0.6.0 | 133 | 9/6/2026 |
| 0.5.0 | 128 | 9/5/2026 |
| 0.4.0 | 127 | 9/3/2026 |
| 0.3.0 | 123 | 8/28/2026 |
| 0.2.0 | 126 | 8/27/2026 |