Vane.Mapper.Container 1.0.1

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

Vane.Mapper.Container

NuGet License: MIT

Native Vane.Container registry adapter for Vane.Mapper. The core package stays dependency-free; this package only registers the built IMapperRuntime as a singleton. Vane.Mapper 的 Vane.Container 原生注册表适配。核心库保持零外部依赖;本包只负责把构建好的 IMapperRuntime 注册为单例。

Install / 安装

dotnet add package Vane.Mapper.Container   # latest stable / 最新稳定版
dotnet add package Vane.Container

# reproducible builds: pin an exact version / 可重现构建请锁定具体版本
# dotnet add package Vane.Mapper.Container --version 1.0.1

Usage / 用法

using Vane.Container;
using Vane.Mapping;
using Vane.Mapping.Container;

var services = new ContainerBuilder();
services.AddVaneMapper(builder =>
{
    builder.Defaults(d => d.CopyMode(CopyMode.Deep));
    builder.Add<User, UserDto>(_ => { });
});

using var container = services.BuildMiniContainer();
var runtime = container.GetRequiredService<IMapperRuntime>();
var dto = runtime.Map<User, UserDto>(user);

AddVaneMapper receiver is IServiceRegistry, so ContainerBuilder, dynamic containers and IServiceRegistry variables all chain directly. AddVaneMapper 的接收者是 IServiceRegistry,ContainerBuilder、动态容器与 IServiceRegistry 变量都能直接链式调用。

Each call builds an independent runtime; single-resolution takes the last registration, GetServices keeps all of them. 每次调用构建独立 runtime;单值解析取最后注册,GetServices 保留全部。

MIT, license text ships with the package · 文档:https://gitee.com/netcasewqs/Vane.Mapper/blob/master/docs/开发手册.md

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 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.  net11.0 is compatible. 
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.1 0 12/6/2026
1.0.0 48 12/5/2026 1.0.0 is deprecated.

1.0.1:修复 MapHandle.Backend 在 CopyMode.Deep 降级后报错后端的问题;生成器集合发射改为预分配+循环(嵌套分配 816 B→744 B);生成器新增 partial void Map(TFrom, TTo) 写入重载。详见 https://gitee.com/netcasewqs/Vane.Mapper/blob/master/docs/RELEASE-1.0.1.md