EricksonLopez.Mapper

dotnet-mapper · Mapeo y Serialización

En esta página (20 secciones)

1. Identidad, Nivel y Perfil de Madurez#

L2 Transversal y FiabilidadEstableMantenimiento: ActivoAOT: ParcialLicencia MITConfianza: HIGH
ApplicationCross-Cuttingnet8.0net9.0net10.0netstandard2.0

2. Propuesta de Valor y Problema que Resuelve#

High-performance, compile-time, reflection-free, Native AOT object mapping ecosystem for modern .NET, powered by Roslyn Incremental Source Generators.

Los mapeadores basados en reflexión introducen sobrecarga JIT, generan advertencias IL2026/IL3050 en Native AOT y evaden constructores o fábricas DDD.

3. Instalación Rápida#

Paquete principal: EricksonLopez.Mapper

dotnet add package EricksonLopez.Mapper --version 2.0.0
También publicado en esta familia:
EricksonLopez.Mapper.AbstractionsEricksonLopez.Mapper.DomainPrimitivesEricksonLopez.Mapper.MapsterEricksonLopez.Mapper.ResultEricksonLopez.Mapper.GeneratorEricksonLopez.Mapper.Analyzers

4. Métricas Verificadas del Ecosistema#

v2.0.0
Versión Publicada en NuGet
v3.0.0
Versión HEAD del Repo
2,330
Descargas en NuGet
7
Paquetes Empaquetables
126
Miembros Públicos de API
22
Filas Benchmark (RyuJIT)

Instantánea recuperada UTC: 2026-12-01

5. Cuándo Usar y Cuándo NO Usar#

Cuándo usar

  • Quieres mapeos generados en compilación verificados por analizadores Roslyn (ELM001–ELM018) con soporte para StrongId y Result<T>.

Cuándo NO usar

  • Dependes de reglas dinámicas configuradas en tiempo de ejecución imposibles de expresar con tipos conocidos en compilación.

6. Capacidades Principales e Invariantes de Diseño#

Generación Sin Reflexión

Emite métodos de mapeo legibles en compilación sin System.Reflection ni Activator en rutas principales.

Adaptadores DDD y Result

Soporta [MapFactory], [MapIgnore], [MapDerivedType], conversión de ValueObjects y ResultMappingExtensions.

7. Paquetes NuGet y Adaptadores Incluidos#

ID del PaqueteEstadoNuGet / LocalTFMsEstado AOTDescargasDescripción
EricksonLopez.MapperPrincipalPublicadov2.0.0 / v3.0.0net8.0, net9.0, net10.0AOT: Completo466Package Description
EricksonLopez.Mapper.AbstractionsPublicadov2.0.0 / v3.0.0netstandard2.0, net8.0, net9.0, net10.0AOT: Completo458Package Description
EricksonLopez.Mapper.DomainPrimitivesPublicadov2.0.0 / v3.0.0net8.0, net9.0, net10.0AOT: Completo271DomainPrimitives integration for EricksonLopez.Mapper. Enables mapping strongly-typed IDs and value objects to and from primitive types.
EricksonLopez.Mapper.MapsterPublicadov2.0.0 / v3.0.0net8.0, net9.0, net10.0AOT: Incompatible270Mapster integration adapter for EricksonLopez.Mapper. Bridges Mapster's configuration and runtime adapter engine with the unified EricksonLopez.Mapper abstraction contracts.
EricksonLopez.Mapper.ResultPublicadov2.0.0 / v3.0.0net8.0, net9.0, net10.0AOT: Completo263Result monad mapping extensions for EricksonLopez.Mapper. Enables functional projection of Result<T> and collections.
EricksonLopez.Mapper.GeneratorAnalizador / GeneradorPublicadov2.0.0 / v3.0.0netstandard2.0AOT: N/A (Analizador/Legado)334Package Description
EricksonLopez.Mapper.AnalyzersAnalizador / GeneradorPublicadov2.0.0 / v3.0.0netstandard2.0AOT: N/A (Analizador/Legado)268Package Description

8. Ejemplo Quick Start#

Basado en APIs públicas verificadas de EricksonLopez.Mapper. Compila con `<ImplicitUsings>disable</ImplicitUsings>` e importaciones explícitas.

using System;
using EricksonLopez.Mapper;

public sealed record OrderEntity(Guid Id, decimal TotalAmount);
public sealed record OrderSummaryDto(Guid Id, decimal TotalAmount);

[Mapper]
public static partial class OrderMapper
{
    public static partial OrderSummaryDto ToDto(OrderEntity source);
}

9. Arquitectura y Flujo de Dependencias#

flowchart LR
  lib_mapper["EricksonLopez.Mapper (L2)"]
  lib_domain_primitives["EricksonLopez.DomainPrimitives (L0)"]
  lib_mapper --> lib_domain_primitives
  lib_result["EricksonLopez.Result (L0)"]
  lib_mapper -.-> lib_result
Topología de Dependencias de EricksonLopez.Mapper2 dependencias hacia librerías aguas arriba y 0 librerías dependientes aguas abajo verificadas en dependencies.json.
Ver descripción textual y tabla accesible

2 dependencias hacia librerías aguas arriba y 0 librerías dependientes aguas abajo verificadas en dependencies.json.

DirecciónLibreríaNivelTipos de Relación
Aguas arribaEricksonLopez.DomainPrimitivesL0Tiempo de compilación, Paquete NuGet
Aguas arribaEricksonLopez.ResultL0Adaptador, Paquete NuGet
flowchart LR
  lib_mapper["EricksonLopez.Mapper (L2)"]
  lib_domain_primitives["EricksonLopez.DomainPrimitives (L0)"]
  lib_mapper --> lib_domain_primitives
  lib_result["EricksonLopez.Result (L0)"]
  lib_mapper -.-> lib_result

10. Target Frameworks y Matriz Native AOT / Trimming#

Inspección MSBuild `.csproj` sobre 7 paquetes: 4 Full, 0 Partial, 1 Incompatible, 2 NotApplicable (analizadores/generadores).

ID del PaqueteIsAotCompatibleEnableTrimAnalyzerEstado AOT VerificadoTarget Frameworks
EricksonLopez.MappertruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Mapper.AbstractionstruetrueFullnetstandard2.0, net8.0, net9.0, net10.0
EricksonLopez.Mapper.DomainPrimitivestruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Mapper.MapsterfalsetrueIncompatiblenet8.0, net9.0, net10.0
EricksonLopez.Mapper.ResulttruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Mapper.GeneratorfalsenullNotApplicablenetstandard2.0
EricksonLopez.Mapper.AnalyzersfalsenullNotApplicablenetstandard2.0

11. Dependencias Aguas Arriba y Dependientes Aguas Abajo#

Dependencias Aguas Arriba (2)

Dependientes Aguas Abajo (0)

Ninguna otra librería EricksonLopez.* depende actualmente de esta familia.

12. Adaptadores Opcionales e Integraciones Externas#

Aristas de Adaptadores Internos y Paquetes de Integración

Dependencias NuGet Externas Verificadas (6)

MapsterMicrosoft.CodeAnalysis.AnalyzersMicrosoft.CodeAnalysis.CommonMicrosoft.CodeAnalysis.CSharpMicrosoft.CodeAnalysis.CSharp.WorkspacesSystem.Composition.AttributedModel

13. Resumen de Configuración y Registro en DI#

Puntos de Entrada DI y Configuración Verificados

  • MapsterMapperExtensions.UseConverter<TSource, TDestination>

    Configures a `TypeAdapterConfig` instance to use the specified `IConverter<TSource, TDestination>` for mapping.

  • ResultMappingExtensions.MapAsync<TSource, TDest>

    Projects the success value of an asynchronous `Result<T>` task using the specified mapping delegate.

  • ResultMappingExtensions.MapList<TSource, TDest>

    Projects a sequence of items contained in a successful `Result<T>` into a read-only list of `TDest`.

Tipos Públicos y Contratos Clave

  • EricksonLopez.Mapper.EnumMappingStrategy (enum)

    Specifies the strategy used to map enumeration values between source and destination enum types.

  • EricksonLopez.Mapper.EnumMappingStrategyAttribute (class)

    Configures the enum mapping strategy and case-sensitivity for an annotated mapper class, interface, or method.

  • EricksonLopez.Mapper.GenerateMapperRegistrationAttribute (class)

    Instructs the source generator to emit Microsoft.Extensions.DependencyInjection extension methods registering all non-static mappers.

  • EricksonLopez.Mapper.IConverter`2 (interface)

    Defines a custom converter that maps a source instance to a destination instance.

  • EricksonLopez.Mapper.MapDerivedTypeAttribute (class)

    Registers a runtime derived type pair for polymorphic dispatch in the generated mapping method.

  • EricksonLopez.Mapper.MapEnumValueAttribute (class)

    Maps a specific source enum member value to an explicit destination enum member value.

  • EricksonLopez.Mapper.MapFactoryAttribute (class)

    Instructs the source generator to instantiate the destination type using a static factory method instead of a constructor.

  • EricksonLopez.Mapper.MapIgnoreAttribute (class)

    Specifies that a destination member is excluded from automatic mapping, suppressing strict mapping diagnostics.

  • EricksonLopez.Mapper.MapIgnoreSourceAttribute (class)

    Specifies that a source member is excluded from member resolution during mapping generation.

  • EricksonLopez.Mapper.MapNullFallbackAttribute (class)

    Specifies a fallback expression to substitute when a nullable source member evaluates to `null` for a non-nullable destination member.

  • EricksonLopez.Mapper.MapPropertyAttribute (class)

    Configures an explicit member-to-member mapping between source and destination properties with differing names.

  • EricksonLopez.Mapper.MapValueAttribute (class)

    Assigns a constant value or custom C# expression directly to a destination member during mapping.

14. Benchmarks de Rendimiento Verificados#

Todas las mediciones verificadas provienen estrictamente de `BenchmarkDotNet.Artifacts` ejecutados sobre .NET RyuJIT (existen 0 ejecuciones NativeAOT en esta instantánea).

Filas totales: 22 · Medidos: 22 · NA / Error: 0 · Suites: 3

Runtimes observados: .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI

CPUs observadas: Unknown processor

SuiteMétodoRuntimeMedia (ns)Asignado (B)Estado
MappingBenchmarksGenerator_Poco.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI2.79832measured
MappingBenchmarksMapperly_Poco.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI2.79932measured
MappingBenchmarksManual_Poco.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI2.90932measured
ValueObjectBenchmarksManual_ValueObjects.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI3.02556measured
ValueObjectBenchmarksMapperly_ValueObjects.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI3.14956measured
ValueObjectBenchmarksGenerator_ValueObjects.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI3.20656measured
MappingBenchmarksMapster_Poco.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI8.44232measured
ValueObjectBenchmarksMapster_ValueObjects.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI8.87456measured
MappingBenchmarksMapperlyMapping.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI16.06192measured
MappingBenchmarksGeneratorMapping.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI16.13192measured
MappingBenchmarksMapperly_Complex.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI17.239200measured
MappingBenchmarksGenerator_Complex.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI17.363200measured
PolymorphicBenchmarksManual_Polymorphic.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI21.35184measured
PolymorphicBenchmarksGenerator_Polymorphic.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI22184measured
MappingBenchmarksAutoMapper_Poco.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI24.90432measured
PolymorphicBenchmarksMapperly_Polymorphic.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI27.57184measured
MappingBenchmarksMapsterMapping.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI1,274.198,248measured
MappingBenchmarksMapster_Complex.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI1,282.3458,256measured
MappingBenchmarksManualMapping.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI1,454.298,248measured
MappingBenchmarksManual_Complex.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI1,482.348,256measured
MappingBenchmarksAutoMapperMapping.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI3,510.0716,792measured
MappingBenchmarksAutoMapper_Complex.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI3,569.34416,800measured

15. Historial de Versiones y Estado NuGet vs Repositorio#

Desfase de versiones detectado: la última versión publicada en NuGet.org es v2.0.0, mientras el HEAD del repositorio local está en v3.0.0.

VersiónOrigenFecha de PublicaciónResumen
v2.0.0 ↗nuget2026-09-22Published EricksonLopez.Mapper 2.0.0 to NuGet.org.
v2.0.0 ↗github2026-09-22Ecosystem Packages in this release | Package | Version | |---------|---------| | `EricksonLopez.Mapper.Abstractions` | `2.0.0` | | `EricksonLopez.Mapper` | `2.0.0` | | `EricksonLopez.Mapper.Generator` | `2.0.0` | | `EricksonLopez.Mapper.Analyzers` | `2.0.0` | | `EricksonLopez.Mapper.DomainPrimitives` | `2.0.0` | | `EricksonLopez.Mapper.Mapster` | `2.0.0` | | `EricksonLopez.Mapper.Result` | `2.0...
v1.0.0 ↗github2026-08-27Ecosystem Packages in this release | Package | Version | |---------|---------| | `EricksonLopez.Mapper.Abstractions` | `1.0.0` | | `EricksonLopez.Mapper` | `1.0.0` | | `EricksonLopez.Mapper.Generator` | `1.0.0` | | `EricksonLopez.Mapper.Analyzers` | `1.0.0` | | `EricksonLopez.Mapper.DomainPrimitives` | `1.0.0` | | `EricksonLopez.Mapper.Mapster` | `1.0.0` | | `EricksonLopez.Mapper.Result` | `1.0...
v1.0.0 ↗nuget2026-08-27Published EricksonLopez.Mapper 1.0.0 to NuGet.org.

Librerías en el mismo nivel, capa arquitectónica o vinculadas directamente mediante aristas de dependencia.

17. Documentación, API Reference y Enlaces del Portal#

Las páginas conceptuales por librería en Starlight se completan en M4; las páginas de API Reference en M3.2.

18. Repositorio Fuente, Licencia y Contribución#

Publicado bajo Licencia MIT. Todos los ensamblados cumplen los invariantes de compilación EricksonLopez.*: importaciones explícitas, firma fuerte (`EricksonLopez.snk`) y metadatos de autor en ASCII (`Erickson Lopez`).

19. Resolución de Problemas, Riesgos y Migración#

  • EricksonLopez.Mapper.Mapster es un puente opcional marcado IsAotCompatible=false; usa el núcleo Mapper para compilaciones Full AOT.
  • Desfase de versiones detectado: la última versión publicada en NuGet.org es v2.0.0, mientras el HEAD del repositorio local está en v3.0.0.

20. Evidencia de Calidad y Verificación#

Firma Fuerte (`EricksonLopez.snk`)
EricksonLopez.snk
`ImplicitUsings=disable`
disable
Extracción de Documentación XML
Verificado (7 namespaces, 46 tipos, 126 miembros)
Atributos MSBuild AOT / Trimming
4 Full / 0 Partial / 1 Incompatible / 2 N/A
Artefactos BenchmarkDotNet
22 total (22 measured, 0 na_error)

Límites Explícitos de Verificación y Alcance

  • Todas las mediciones verificadas provienen estrictamente de `BenchmarkDotNet.Artifacts` ejecutados sobre .NET RyuJIT (existen 0 ejecuciones NativeAOT en esta instantánea).

Buscar en el Ecosistema EricksonLopez.*

Escribe el nombre de una librería, ID de paquete NuGet, tipo .NET o concepto arquitectónico para buscar en el portal.