Skip to content

Search EricksonLopez.* Ecosystem

Type a library name, NuGet package ID, .NET type, or architectural concept to search across the portal.

EricksonLopez.Mapper Overview

EricksonLopez.Mapper (2.0.0 on NuGet, L2) is a Roslyn incremental source generator producing compile-time, zero-reflection object mapping implementations with strict ELM* diagnostics and integrations for Result and DomainPrimitives.

  • Compile-time code emission: [Mapper] partial classes emit direct property assignments at build time ({Namespace}_{ClassName}.g.cs), eliminating runtime reflection and dynamic IL emit.
  • Strict mapping safety (StrictMapping = true): Every unmapped destination property fails compilation via ELM001 rather than silently leaving properties at default values.
  • Ecosystem integrations: Dedicated satellites map Result<T> pipelines (EricksonLopez.Mapper.Result) and strongly-typed IDs / domain primitives (EricksonLopez.Mapper.DomainPrimitives).
  • Explicit reflection boundary: Runtime Mapster bridging is isolated in EricksonLopez.Mapper.Mapster (IsAotCompatible=false), keeping core mapping packages Full AOT.
flowchart LR
Src["[Mapper] partial class"] --> Gen["EricksonLopez.Mapper.Generator"]
Gen --> Diag["Analyzers (ELM001-ELM018)"]
Gen --> Emit["{Namespace}_{ClassName}.g.cs"]
Emit --> Call["Zero-Reflection Direct Mapping"]
Compile-Time Roslyn Mapping PipelineAt compile time, EricksonLopez.Mapper.Generator inspects partial [Mapper] classes and emits zero-allocation mapping bodies alongside ELM001-ELM018 analyzer checks.
View accessible text summary and structure

At compile time, EricksonLopez.Mapper.Generator inspects partial [Mapper] classes and emits zero-allocation mapping bodies alongside ELM001-ELM018 analyzer checks.

flowchart LR
Src["[Mapper] partial class"] --> Gen["EricksonLopez.Mapper.Generator"]
Gen --> Diag["Analyzers (ELM001-ELM018)"]
Gen --> Emit["{Namespace}_{ClassName}.g.cs"]
Emit --> Call["Zero-Reflection Direct Mapping"]

All 7 packages are published at 2.0.0 on NuGet (2,330 total downloads; localVersion: 3.0.0 on disk). Overall AOT status is Partial (4 Full, 1 Incompatible, 2 NotApplicable):

Package NuGet (2.0.0) AOT Status TFMs Role
EricksonLopez.Mapper Published (466 dl) Full net8.0;net9.0;net10.0 Umbrella package packing Generator and Analyzers into analyzers/dotnet/cs
EricksonLopez.Mapper.Abstractions Published (458 dl) Full netstandard2.0;net8.0;net9.0;net10.0 [Mapper], mapping attributes, IConverter<TSource, TDestination> (namespace EricksonLopez.Mapper)
EricksonLopez.Mapper.DomainPrimitives Published (271 dl) Full net8.0;net9.0;net10.0 StrongIdToValueConverter, ValueToDomainPrimitiveConverter, DomainPrimitiveToValueConverter
EricksonLopez.Mapper.Result Published (263 dl) Full net8.0;net9.0;net10.0 ResultMappingExtensions (Map, MapAsync, MapList)
EricksonLopez.Mapper.Mapster Published (270 dl) Incompatible net8.0;net9.0;net10.0 Reflection-based Mapster bridge (IsAotCompatible=false, EnableTrimAnalyzer=true)
EricksonLopez.Mapper.Generator Published (334 dl) NotApplicable netstandard2.0 Roslyn incremental source generator
EricksonLopez.Mapper.Analyzers Published (268 dl) NotApplicable netstandard2.0 Roslyn diagnostics (ELM008, ELM009, ELM012)

Measured directly from BenchmarkDotNet.Artifacts (22 measured rows, 0 na_error rows) on .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI (Unknown processor hardware string; no NativeAOT reports):

  • MappingBenchmarks.Generator_Poco: 2.798 ns / 32 B (vs Manual_Poco: 2.909 ns / 32 B; Mapperly_Poco: 2.799 ns / 32 B; Mapster_Poco: 8.442 ns / 32 B; AutoMapper_Poco: 24.904 ns / 32 B)
  • MappingBenchmarks.Generator_Complex: 17.363 ns / 200 B (vs Mapperly_Complex: 17.239 ns / 200 B; Mapster_Complex: 1,282.345 ns / 8,256 B; AutoMapper_Complex: 3,569.344 ns / 16,800 B)
  • PolymorphicBenchmarks.Generator_Polymorphic: 22 ns / 184 B
  • ValueObjectBenchmarks.Generator_ValueObjects: 3.206 ns / 56 B