Referencia Pública de API .NETL2 Transversal y FiabilidadEstableAOT: Parcial

EricksonLopez.Mapper

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

7 namespaces46 tipos126 miembrosGenerado desde XML docs y ensamblados · UTC 2026-12-01

Mostrando 46 de 46 tipos (126 miembros)

EricksonLopez.Mapper#

17
enum

EnumMappingStrategy

Ensamblado: EricksonLopez.Mapper.Abstractions
public enum EnumMappingStrategy

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

Miembros (2)

  • fieldByName
    ByName = 0

    Maps enumeration members by matching their identifier names.

  • fieldByValue
    ByValue = 1

    Maps enumeration members by their underlying integer or numeric values.

class

EnumMappingStrategyAttribute

Ensamblado: EricksonLopez.Mapper.Abstractions
public sealed class EnumMappingStrategyAttribute : Attribute
Hereda de: Attribute

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

Miembros (3)

  • constructorEnumMappingStrategyAttribute
    public EnumMappingStrategyAttribute(EnumMappingStrategy strategy)

    Initializes a new instance of the `EnumMappingStrategyAttribute` class with the specified enum mapping strategy.

    strategy: EnumMappingStrategy
    The enum mapping strategy to apply
  • propertyIgnoreCase
    public bool IgnoreCase { get; set; }

    Gets or sets a value indicating whether enum member names are matched case-insensitively.

  • propertyStrategy
    public EnumMappingStrategy Strategy { get; }

    Gets the enum mapping strategy applied to the annotated target.

class

GenerateMapperRegistrationAttribute

Ensamblado: EricksonLopez.Mapper.Abstractions
public sealed class GenerateMapperRegistrationAttribute : Attribute
Hereda de: Attribute

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

Notas:

Applied at assembly level to generate an `AddGeneratedMappers` extension method on `IServiceCollection`.

Miembros (0)

Este tipo declara 0 miembros públicos (por ejemplo, interfaz marcadora o enum/record vacío).

interface

IConverter<TSource, TDestination>

Ensamblado: EricksonLopez.Mapper.Abstractions
public interface IConverter<TSource, TDestination>

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

Notas:

Implement this contract to supply custom transformation logic for a specific source and destination type pair. Type parameters: TSource: The source type to convert from.; TDestination: The destination type to convert to.

Miembros (1)

  • methodConvert
    TDestination Convert(TSource source)

    Converts the specified source instance to an instance of `TDestination`.

    source: TSource
    The source instance to convert

    Retorna: The converted instance of `TDestination`.

class

MapDerivedTypeAttribute

Ensamblado: EricksonLopez.Mapper.Abstractions
public sealed class MapDerivedTypeAttribute : Attribute
Hereda de: Attribute

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

Notas:

When applied to a mapping method, the source generator emits a type pattern-matching switch expression that delegates derived source instances to their corresponding derived destination mappings.

Miembros (3)

  • constructorMapDerivedTypeAttribute
    public MapDerivedTypeAttribute(Type sourceType, Type targetType)

    Initializes a new instance of the `MapDerivedTypeAttribute` class with the specified source and target types.

    sourceType: Type
    The derived source type to match at runtime
    targetType: Type
    The derived destination type to instantiate
  • propertySourceType
    public Type SourceType { get; }

    Gets the derived source runtime type to match during polymorphic dispatch.

  • propertyTargetType
    public Type TargetType { get; }

    Gets the derived destination type to instantiate when the source instance matches `SourceType`.

class

MapEnumValueAttribute

Ensamblado: EricksonLopez.Mapper.Abstractions
public sealed class MapEnumValueAttribute : Attribute
Hereda de: Attribute

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

Notas:

Multiple instances can be applied to a mapping method to override individual enum member pairings.

Miembros (3)

  • constructorMapEnumValueAttribute
    public MapEnumValueAttribute(object source, object target)

    Initializes a new instance of the `MapEnumValueAttribute` class with explicit source and destination enum values.

    source: object
    The source enum member value
    target: object
    The destination enum member value
  • propertySource
    public object Source { get; }

    Gets the source enum member value to map from.

  • propertyTarget
    public object Target { get; }

    Gets the destination enum member value to map to.

class

MapFactoryAttribute

Ensamblado: EricksonLopez.Mapper.Abstractions
public sealed class MapFactoryAttribute : Attribute
Hereda de: Attribute

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

Notas:

The referenced method must be static, public, return the destination type, and declare parameters compatible with source properties.

Miembros (2)

  • constructorMapFactoryAttribute
    public MapFactoryAttribute(string methodName)

    Initializes a new instance of the `MapFactoryAttribute` class with the specified static factory method name.

    methodName: string
    The name of the static factory method to invoke on the destination type
  • propertyMethodName
    public string MethodName { get; }

    Gets the name of the static factory method declared on the destination type.

class

MapIgnoreAttribute

Ensamblado: EricksonLopez.Mapper.Abstractions
public sealed class MapIgnoreAttribute : Attribute
Hereda de: Attribute

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

Notas:

Multiple instances can be applied to a single mapping method to ignore several destination members.

Miembros (2)

  • constructorMapIgnoreAttribute
    public MapIgnoreAttribute(string destinationName)

    Initializes a new instance of the `MapIgnoreAttribute` class with the specified destination member name.

    destinationName: string
    The name of the destination member to exclude from mapping
  • propertyDestinationName
    public string DestinationName { get; }

    Gets the name of the destination member to exclude from mapping.

class

MapIgnoreSourceAttribute

Ensamblado: EricksonLopez.Mapper.Abstractions
public sealed class MapIgnoreSourceAttribute : Attribute
Hereda de: Attribute

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

Notas:

Multiple instances can be applied to a single mapping method to ignore several source members.

Miembros (2)

  • constructorMapIgnoreSourceAttribute
    public MapIgnoreSourceAttribute(string sourceName)

    Initializes a new instance of the `MapIgnoreSourceAttribute` class with the specified source member name.

    sourceName: string
    The name of the source property to exclude from mapping
  • propertySourceName
    public string SourceName { get; }

    Gets the name of the source member to exclude from mapping resolution.

class

MapNullFallbackAttribute

Ensamblado: EricksonLopez.Mapper.Abstractions
public sealed class MapNullFallbackAttribute : Attribute
Hereda de: Attribute

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

Notas:

The expression is emitted verbatim as the right-hand operand of a null-coalescing expression in the generated mapping code.

Miembros (3)

  • constructorMapNullFallbackAttribute
    public MapNullFallbackAttribute(string destinationName, string fallbackExpression)

    Initializes a new instance of the `MapNullFallbackAttribute` class with the destination member name and fallback expression.

    destinationName: string
    The name of the destination member receiving the fallback
    fallbackExpression: string
    The valid C# expression emitted when the source value is `null`
  • propertyDestinationName
    public string DestinationName { get; }

    Gets the name of the destination member to which the fallback expression applies.

  • propertyFallbackExpression
    public string FallbackExpression { get; }

    Gets the C# expression emitted when the source member is `null`.

class

MapPropertyAttribute

Ensamblado: EricksonLopez.Mapper.Abstractions
public sealed class MapPropertyAttribute : Attribute
Hereda de: Attribute

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

Notas:

Multiple instances can be applied to a single mapping method to configure multiple remapped properties.

Miembros (3)

  • constructorMapPropertyAttribute
    public MapPropertyAttribute(string sourceName, string destinationName)

    Initializes a new instance of the `MapPropertyAttribute` class with the specified source and destination names.

    sourceName: string
    The name of the source property or parameter to map from
    destinationName: string
    The name of the destination property or parameter to map to
  • propertyDestinationName
    public string DestinationName { get; }

    Gets the name of the destination property or constructor parameter to populate.

  • propertySourceName
    public string SourceName { get; }

    Gets the name of the source property or constructor parameter to read from.

class

MapValueAttribute

Ensamblado: EricksonLopez.Mapper.Abstractions
public sealed class MapValueAttribute : Attribute
Hereda de: Attribute

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

Notas:

The expression is emitted verbatim in the generated assignment or constructor argument.

Miembros (3)

  • constructorMapValueAttribute
    public MapValueAttribute(string destinationName, string valueExpression)

    Initializes a new instance of the `MapValueAttribute` class with the destination member name and expression.

    destinationName: string
    The name of the destination property or constructor parameter
    valueExpression: string
    The valid C# expression string assigned to the destination member
  • propertyDestinationName
    public string DestinationName { get; }

    Gets the name of the destination member receiving the assigned value.

  • propertyValueExpression
    public string ValueExpression { get; }

    Gets the C# expression string emitted for the destination assignment.

class

MapperAttribute

Ensamblado: EricksonLopez.Mapper.Abstractions
public sealed class MapperAttribute : Attribute
Hereda de: Attribute

Specifies that the annotated class or interface is a mapper whose partial methods are implemented by the source generator at compile time.

Miembros (1)

  • propertyStrictMapping
    public bool StrictMapping { get; set; }

    Gets or sets a value indicating whether strict mapping mode is enforced.

    When set to `true`, every destination member must have a matching source member, an explicit property mapping, a fallback value, or an explicit ignore directive; unmapped members produce a compile-time diagnostic.

class

MapperDefaultsAttribute

Ensamblado: EricksonLopez.Mapper.Abstractions
public sealed class MapperDefaultsAttribute : Attribute
Hereda de: Attribute

Configures assembly-level default mapping conventions and behavior for all mappers in the compilation.

Miembros (3)

  • propertyEnumIgnoreCase
    public bool EnumIgnoreCase { get; set; }

    Gets or sets a value indicating whether enum member names are matched case-insensitively by default.

  • propertyEnumMappingStrategy
    public EnumMappingStrategy EnumMappingStrategy { get; set; }

    Gets or sets the default strategy applied during enum conversions across the assembly.

  • propertyStrictMapping
    public bool StrictMapping { get; set; }

    Gets or sets a value indicating whether strict mapping validation is enabled by default across all mappers in the assembly.

class

MapperIgnoreAttribute

Ensamblado: EricksonLopez.Mapper.Abstractions
public sealed class MapperIgnoreAttribute : Attribute
Hereda de: Attribute

Excludes a property or field from participating in mapping operations when declared directly on the model member.

Notas:

Can be placed directly on source or destination model properties to exclude them across all mappers.

Miembros (0)

Este tipo declara 0 miembros públicos (por ejemplo, interfaz marcadora o enum/record vacío).

class

UseConverterAttribute

Ensamblado: EricksonLopez.Mapper.Abstractions
public sealed class UseConverterAttribute : Attribute
Hereda de: Attribute

Specifies a custom `IConverter<TSource, TDestination>` implementation or mapper member to handle the entire mapping operation.

Notas:

When applied to a mapping method, the generator delegates execution directly to the converter rather than synthesizing member assignments.

Miembros (4)

  • constructorUseConverterAttribute
    public UseConverterAttribute(string converterFieldName)

    Initializes a new instance of the `UseConverterAttribute` class with the name of an existing converter field or property.

    converterFieldName: string
    The name of the instance field or property holding the converter
  • constructorUseConverterAttribute
    public UseConverterAttribute(Type converterType)

    Initializes a new instance of the `UseConverterAttribute` class with a converter type instantiated via its parameterless constructor.

    converterType: Type
    The type implementing `IConverter<TSource, TDestination>` for the mapping method signatures
  • propertyConverterFieldName
    public string? ConverterFieldName { get; }

    Gets the name of the instance field or property supplying the converter instance.

  • propertyConverterType
    public Type ConverterType { get; }

    Gets the type of the converter implementing `IConverter<TSource, TDestination>`.

class

ValueObjectAttribute

Ensamblado: EricksonLopez.Mapper.Abstractions
public sealed class ValueObjectAttribute : Attribute
Hereda de: Attribute

Marks a class or struct as a single-value wrapper (Value Object) to be mapped by wrapping or unwrapping its underlying value.

Notas:

When mapping between a primitive and a type annotated with this attribute, the generator extracts or passes the inner value directly.

Miembros (0)

Este tipo declara 0 miembros públicos (por ejemplo, interfaz marcadora o enum/record vacío).

EricksonLopez.Mapper.Analyzers#

7
class

AddPartialMappingMethodCodeFixProvider

Ensamblado: EricksonLopez.Mapper.Analyzers
public class AddPartialMappingMethodCodeFixProvider : CodeFixProvider
Hereda de: CodeFixProvider

Provides a code fix for `ELM003` that generates a partial mapping method stub to allow custom conversion logic for unsupported type pairs.

Miembros (3)

  • methodGetFixAllProvider
    public sealed override FixAllProvider GetFixAllProvider()

    Inherits documentation from base type or interface.

  • methodRegisterCodeFixesAsync
    public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)

    Inherits documentation from base type or interface.

    context: CodeFixContext
  • propertyFixableDiagnosticIds
    public sealed override ImmutableArray<string> FixableDiagnosticIds { get; }

    Inherits documentation from base type or interface.

class

MakePartialCodeFixProvider

Ensamblado: EricksonLopez.Mapper.Analyzers
public class MakePartialCodeFixProvider : CodeFixProvider
Hereda de: CodeFixProvider

Provides a code fix for `ELM012` that adds the `partial` modifier to a mapper declaration.

Miembros (3)

  • methodGetFixAllProvider
    public sealed override FixAllProvider GetFixAllProvider()

    Inherits documentation from base type or interface.

  • methodRegisterCodeFixesAsync
    public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)

    Inherits documentation from base type or interface.

    context: CodeFixContext
  • propertyFixableDiagnosticIds
    public sealed override ImmutableArray<string> FixableDiagnosticIds { get; }

    Inherits documentation from base type or interface.

class

MapFactoryCodeFixProvider

Ensamblado: EricksonLopez.Mapper.Analyzers
public class MapFactoryCodeFixProvider : CodeFixProvider
Hereda de: CodeFixProvider

Provides a code fix for `ELM007` that adds a `[MapFactory("Create")]` attribute to resolve constructor ambiguity.

Miembros (3)

  • methodGetFixAllProvider
    public sealed override FixAllProvider GetFixAllProvider()

    Inherits documentation from base type or interface.

  • methodRegisterCodeFixesAsync
    public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)

    Inherits documentation from base type or interface.

    context: CodeFixContext
  • propertyFixableDiagnosticIds
    public sealed override ImmutableArray<string> FixableDiagnosticIds { get; }

    Inherits documentation from base type or interface.

class

MapIgnoreCodeFixProvider

Ensamblado: EricksonLopez.Mapper.Analyzers
public class MapIgnoreCodeFixProvider : CodeFixProvider
Hereda de: CodeFixProvider

Provides a code fix for `ELM001` that adds a `[MapIgnore("MemberName")]` attribute to suppress unmapped destination member errors.

Miembros (3)

  • methodGetFixAllProvider
    public sealed override FixAllProvider GetFixAllProvider()

    Inherits documentation from base type or interface.

  • methodRegisterCodeFixesAsync
    public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)

    Inherits documentation from base type or interface.

    context: CodeFixContext
  • propertyFixableDiagnosticIds
    public sealed override ImmutableArray<string> FixableDiagnosticIds { get; }

    Inherits documentation from base type or interface.

class

MapNullFallbackCodeFixProvider

Ensamblado: EricksonLopez.Mapper.Analyzers
public class MapNullFallbackCodeFixProvider : CodeFixProvider
Hereda de: CodeFixProvider

Provides a code fix for `ELM004` that adds a `[MapNullFallback("MemberName", "defaultValue")]` attribute to handle nullable-to-non-nullable assignments.

Miembros (3)

  • methodGetFixAllProvider
    public sealed override FixAllProvider GetFixAllProvider()

    Inherits documentation from base type or interface.

  • methodRegisterCodeFixesAsync
    public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)

    Inherits documentation from base type or interface.

    context: CodeFixContext
  • propertyFixableDiagnosticIds
    public sealed override ImmutableArray<string> FixableDiagnosticIds { get; }

    Inherits documentation from base type or interface.

class

MapPropertyCodeFixProvider

Ensamblado: EricksonLopez.Mapper.Analyzers
public class MapPropertyCodeFixProvider : CodeFixProvider
Hereda de: CodeFixProvider

Provides a code fix for `ELM001` that adds a `[MapProperty("Source", "Destination")]` attribute to remap an unmapped destination member.

Miembros (3)

  • methodGetFixAllProvider
    public sealed override FixAllProvider GetFixAllProvider()

    Inherits documentation from base type or interface.

  • methodRegisterCodeFixesAsync
    public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)

    Inherits documentation from base type or interface.

    context: CodeFixContext
  • propertyFixableDiagnosticIds
    public sealed override ImmutableArray<string> FixableDiagnosticIds { get; }

    Inherits documentation from base type or interface.

class

MapperAnalyzer

Ensamblado: EricksonLopez.Mapper.Analyzers
public class MapperAnalyzer : DiagnosticAnalyzer
Hereda de: DiagnosticAnalyzer

Analyzes mapper declarations to enforce AOT compilation principles, prohibiting reflection and `dynamic` keywords, and requiring the `partial` modifier on types annotated with `MapperAttribute`.

Miembros (5)

  • methodInitialize
    public override void Initialize(AnalysisContext context)

    Inherits documentation from base type or interface.

    context: AnalysisContext
  • propertySupportedDiagnostics
    public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }

    Inherits documentation from base type or interface.

  • fieldMustBePartial
    public static readonly DiagnosticDescriptor MustBePartial

    Represents the diagnostic descriptor for `ELM012`, raised when a mapper type is not declared with the `partial` modifier.

  • fieldUsesDynamic
    public static readonly DiagnosticDescriptor UsesDynamic

    Represents the diagnostic descriptor for `ELM009`, raised when a mapper uses the `dynamic` keyword.

  • fieldUsesReflection
    public static readonly DiagnosticDescriptor UsesReflection

    Represents the diagnostic descriptor for `ELM008`, raised when a mapper uses reflection APIs.

EricksonLopez.Mapper.DomainPrimitives#

3
class

DomainPrimitiveToValueConverter<TPrimitive, TValue>

Ensamblado: EricksonLopez.Mapper.DomainPrimitives
public sealed class DomainPrimitiveToValueConverter<TPrimitive, TValue> : IConverter<TPrimitive, TValue> where TPrimitive : IDomainPrimitive<TPrimitive, TValue> where TValue : notnull, IComparable<TValue>, IEquatable<TValue>
Implementa: IConverter<TPrimitive, TValue>

Provides conversion from an `IDomainPrimitive<TSelf, TValue>` instance to its underlying primitive value.

Notas:

Type parameters: TPrimitive: The domain primitive type.; TValue: The underlying primitive value type.

Miembros (1)

  • methodConvert
    public TValue Convert(TPrimitive source)

    Converts the specified source instance to an instance of `TDestination`.

    source: TPrimitive
    The source instance to convert

    Retorna: The converted instance of `TDestination`.

    Exceptions: ArgumentNullException: `source` is `null`

class

StrongIdToValueConverter<TStrongId, TValue>

Ensamblado: EricksonLopez.Mapper.DomainPrimitives
public sealed class StrongIdToValueConverter<TStrongId, TValue> : IConverter<TStrongId, TValue> where TStrongId : IStrongId<TStrongId, TValue> where TValue : notnull, IComparable<TValue>, IEquatable<TValue>
Implementa: IConverter<TStrongId, TValue>

Provides conversion from an `IStrongId<TSelf, TValue>` instance to its underlying value.

Notas:

Type parameters: TStrongId: The strongly-typed identifier type.; TValue: The underlying value type.

Miembros (1)

  • methodConvert
    public TValue Convert(TStrongId source)

    Converts the specified source instance to an instance of `TDestination`.

    source: TStrongId
    The source instance to convert

    Retorna: The converted instance of `TDestination`.

    Exceptions: ArgumentNullException: `source` is `null`

class

ValueToDomainPrimitiveConverter<TValue, TPrimitive>

Ensamblado: EricksonLopez.Mapper.DomainPrimitives
public sealed class ValueToDomainPrimitiveConverter<TValue, TPrimitive> : IConverter<TValue, TPrimitive> where TPrimitive : IDomainPrimitive<TPrimitive, TValue> where TValue : notnull, IComparable<TValue>, IEquatable<TValue>
Implementa: IConverter<TValue, TPrimitive>

Provides conversion from a primitive value to an `IDomainPrimitive<TSelf, TValue>` instance.

Notas:

Type parameters: TValue: The primitive value type.; TPrimitive: The domain primitive type.

Miembros (1)

  • methodConvert
    public TPrimitive Convert(TValue source)

    Converts the specified source instance to an instance of `TDestination`.

    source: TValue
    The source instance to convert

    Retorna: The converted instance of `TDestination`.

    Exceptions: ArgumentNullException: `source` is `null`

EricksonLopez.Mapper.Generator#

2
class

MapperGenerator

Ensamblado: EricksonLopez.Mapper.Generator
public class MapperGenerator : IIncrementalGenerator
Implementa: IIncrementalGenerator

Provides compile-time source generation for strongly-typed object mappers annotated with `MapperAttribute`.

Miembros (1)

  • methodInitialize
    public void Initialize(IncrementalGeneratorInitializationContext context)

    Inherits documentation from base type or interface.

    context: IncrementalGeneratorInitializationContext
class

MemberResolutionEngine.PropertyPathResolution

Ensamblado: EricksonLopez.Mapper.Generator
public class PropertyPathResolution

Represents the resolved metadata for a flattened or nested property path expression.

Miembros (5)

  • constructorPropertyPathResolution
    public PropertyPathResolution(ITypeSymbol leafType, bool isPathNullable, string formattedPath, string leafPropertyName)

    Initializes a new instance of the `PropertyPathResolution` class.

    leafType: ITypeSymbol
    The type symbol of the terminal property.
    isPathNullable: bool
    Whether any segment in the path can be null.
    formattedPath: string
    The formatted C# access expression.
    leafPropertyName: string
    The terminal property name.
  • propertyFormattedPath
    public string FormattedPath { get; }

    Gets the C# member-access expression string (with null-conditional operators where appropriate).

  • propertyIsPathNullable
    public bool IsPathNullable { get; }

    Gets a value indicating whether any intermediate or leaf segment in the path is nullable.

  • propertyLeafPropertyName
    public string LeafPropertyName { get; }

    Gets the identifier of the terminal property in the path.

  • propertyLeafType
    public ITypeSymbol LeafType { get; }

    Gets the type symbol of the terminal property in the path.

EricksonLopez.Mapper.Generator.Models#

14
record

ConstructionStrategy.FactoryMethod

Ensamblado: EricksonLopez.Mapper.Generator
public record FactoryMethod(string MethodName, EquatableArray<ParameterMapping> Parameters) : ConstructionStrategy
Hereda de: ConstructionStrategy

Instantiates the target type via a static factory method.

Miembros (3)

  • constructorFactoryMethod
    public FactoryMethod(string MethodName, EquatableArray<ParameterMapping> Parameters)

    Initializes a new instance of FactoryMethod.

    MethodName: string
    The factory method name.
    Parameters: EquatableArray<ParameterMapping>
    The ordered factory method parameter mappings.
  • propertyMethodName
    public string MethodName { get; init; }

    The factory method name.

  • propertyParameters
    public EquatableArray<ParameterMapping> Parameters { get; init; }

    The ordered factory method parameter mappings.

record

ConstructionStrategy.ObjectInitializer

Ensamblado: EricksonLopez.Mapper.Generator
public record ObjectInitializer : ConstructionStrategy
Hereda de: ConstructionStrategy

Instantiates the target type via a parameterless constructor and object initializer.

Miembros (0)

Este tipo declara 0 miembros públicos (por ejemplo, interfaz marcadora o enum/record vacío).

record

ConstructionStrategy.ParameterizedConstructor

Ensamblado: EricksonLopez.Mapper.Generator
public record ParameterizedConstructor(EquatableArray<ParameterMapping> Parameters) : ConstructionStrategy
Hereda de: ConstructionStrategy

Instantiates the target type via a parameterized constructor.

Miembros (2)

  • constructorParameterizedConstructor
    public ParameterizedConstructor(EquatableArray<ParameterMapping> Parameters)

    Initializes a new instance of ParameterizedConstructor.

    Parameters: EquatableArray<ParameterMapping>
    The ordered constructor parameter mappings.
  • propertyParameters
    public EquatableArray<ParameterMapping> Parameters { get; init; }

    The ordered constructor parameter mappings.

record

ConstructionStrategy.Unsupported

Ensamblado: EricksonLopez.Mapper.Generator
public record Unsupported(string Reason) : ConstructionStrategy
Hereda de: ConstructionStrategy

Indicates that no viable construction strategy was found for the target type.

Miembros (2)

  • constructorUnsupported
    public Unsupported(string Reason)

    Initializes a new instance of Unsupported.

    Reason: string
    The diagnostic reason describing why construction is unsupported.
  • propertyReason
    public string Reason { get; init; }

    The diagnostic reason describing why construction is unsupported.

record

ConversionStrategy.BuiltinConversion

Ensamblado: EricksonLopez.Mapper.Generator
public record BuiltinConversion(string ExpressionTemplate) : ConversionStrategy
Hereda de: ConversionStrategy

Represents a built-in type conversion that emits a specific expression template. The template uses {0} as placeholder for the source expression. Examples: "(long){0}", "{0}.ToString()", "Enum.Parse<TargetEnum>({0})", "Guid.Parse({0})".

Miembros (2)

  • constructorBuiltinConversion
    public BuiltinConversion(string ExpressionTemplate)

    Initializes a new instance of BuiltinConversion.

    ExpressionTemplate: string
    The expression template string containing {0} as a placeholder.
  • propertyExpressionTemplate
    public string ExpressionTemplate { get; init; }

    The expression template string containing {0} as a placeholder.

record

ConversionStrategy.CustomMethod

Ensamblado: EricksonLopez.Mapper.Generator
public record CustomMethod(string MethodName) : ConversionStrategy
Hereda de: ConversionStrategy

Invokes a user-defined custom mapping or converter method.

Miembros (2)

  • constructorCustomMethod
    public CustomMethod(string MethodName)

    Initializes a new instance of CustomMethod.

    MethodName: string
    The name of the converter method to invoke.
  • propertyMethodName
    public string MethodName { get; init; }

    The name of the converter method to invoke.

record

ConversionStrategy.DictionaryMapping

Ensamblado: EricksonLopez.Mapper.Generator
public record DictionaryMapping(ConversionStrategy KeyStrategy, ConversionStrategy ValueStrategy, string SourceKeyType, string TargetKeyType, string SourceValueType, string TargetValueType, bool SourceHasCount) : ConversionStrategy
Hereda de: ConversionStrategy

Maps a dictionary source to a target dictionary type by converting keys and values.

Miembros (8)

  • constructorDictionaryMapping
    public DictionaryMapping(ConversionStrategy KeyStrategy, ConversionStrategy ValueStrategy, string SourceKeyType, string TargetKeyType, string SourceValueType, string TargetValueType, bool SourceHasCount = false)

    Initializes a new instance of DictionaryMapping.

    KeyStrategy: ConversionStrategy
    ValueStrategy: ConversionStrategy
    SourceKeyType: string
    TargetKeyType: string
    SourceValueType: string
    TargetValueType: string
    SourceHasCount: bool
  • propertyKeyStrategy
    public ConversionStrategy KeyStrategy { get; init; }
  • propertySourceHasCount
    public bool SourceHasCount { get; init; }
  • propertySourceKeyType
    public string SourceKeyType { get; init; }
  • propertySourceValueType
    public string SourceValueType { get; init; }
  • propertyTargetKeyType
    public string TargetKeyType { get; init; }
  • propertyTargetValueType
    public string TargetValueType { get; init; }
  • propertyValueStrategy
    public ConversionStrategy ValueStrategy { get; init; }
record

ConversionStrategy.DirectAssignment

Ensamblado: EricksonLopez.Mapper.Generator
public record DirectAssignment : ConversionStrategy
Hereda de: ConversionStrategy

Assigns the source expression directly to the target without conversion.

Miembros (0)

Este tipo declara 0 miembros públicos (por ejemplo, interfaz marcadora o enum/record vacío).

record

ConversionStrategy.EnumToEnumMapping

Ensamblado: EricksonLopez.Mapper.Generator
public record EnumToEnumMapping(string TargetEnumType, EquatableArray<string> UnmappedSourceMembers) : ConversionStrategy
Hereda de: ConversionStrategy

Maps a source enum to a target enum using compile-time switch expressions.

Miembros (3)

  • constructorEnumToEnumMapping
    public EnumToEnumMapping(string TargetEnumType, EquatableArray<string> UnmappedSourceMembers)

    Initializes a new instance of EnumToEnumMapping.

    TargetEnumType: string
    The fully qualified target enum type name.
    UnmappedSourceMembers: EquatableArray<string>
    Source enum members that have no matching target member.
  • propertyTargetEnumType
    public string TargetEnumType { get; init; }

    The fully qualified target enum type name.

  • propertyUnmappedSourceMembers
    public EquatableArray<string> UnmappedSourceMembers { get; init; }

    Source enum members that have no matching target member.

record

ConversionStrategy.EnumerableMapping

Ensamblado: EricksonLopez.Mapper.Generator
public record EnumerableMapping(ConversionStrategy ElementStrategy, string SourceElementType, string TargetElementType, bool IsArray, bool IsList, bool IsImmutableArray, bool SourceIsArray, bool SourceHasCount, bool IsHashSet, bool IsImmutableList, bool IsFrozenSet, bool SourceIsValueType, bool SourceIsImmutableArray, bool IsSourceNullable, bool IsTargetNullable) : ConversionStrategy
Hereda de: ConversionStrategy

Maps an enumerable or collection source to a target collection type.

Miembros (16)

  • constructorEnumerableMapping
    public EnumerableMapping(ConversionStrategy ElementStrategy, string SourceElementType, string TargetElementType, bool IsArray, bool IsList, bool IsImmutableArray, bool SourceIsArray, bool SourceHasCount, bool IsHashSet = false, bool IsImmutableList = false, bool IsFrozenSet = false, bool SourceIsValueType = false, bool SourceIsImmutableArray = false, bool IsSourceNullable = false, bool IsTargetNullable = false)

    Initializes a new instance of EnumerableMapping.

    ElementStrategy: ConversionStrategy
    SourceElementType: string
    TargetElementType: string
    IsArray: bool
    IsList: bool
    IsImmutableArray: bool
    SourceIsArray: bool
    SourceHasCount: bool
    IsHashSet: bool
    IsImmutableList: bool
    IsFrozenSet: bool
    SourceIsValueType: bool
    SourceIsImmutableArray: bool
    IsSourceNullable: bool
    IsTargetNullable: bool
  • propertyElementStrategy
    public ConversionStrategy ElementStrategy { get; init; }
  • propertyIsArray
    public bool IsArray { get; init; }
  • propertyIsFrozenSet
    public bool IsFrozenSet { get; init; }
  • propertyIsHashSet
    public bool IsHashSet { get; init; }
  • propertyIsImmutableArray
    public bool IsImmutableArray { get; init; }
  • propertyIsImmutableList
    public bool IsImmutableList { get; init; }
  • propertyIsList
    public bool IsList { get; init; }
  • propertyIsSourceNullable
    public bool IsSourceNullable { get; init; }
  • propertyIsTargetNullable
    public bool IsTargetNullable { get; init; }
  • propertySourceElementType
    public string SourceElementType { get; init; }
  • propertySourceHasCount
    public bool SourceHasCount { get; init; }
  • propertySourceIsArray
    public bool SourceIsArray { get; init; }
  • propertySourceIsImmutableArray
    public bool SourceIsImmutableArray { get; init; }
  • propertySourceIsValueType
    public bool SourceIsValueType { get; init; }
  • propertyTargetElementType
    public string TargetElementType { get; init; }
record

ConversionStrategy.ExplicitCast

Ensamblado: EricksonLopez.Mapper.Generator
public record ExplicitCast : ConversionStrategy
Hereda de: ConversionStrategy

Applies an explicit C# cast expression to convert the source value.

Miembros (0)

Este tipo declara 0 miembros públicos (por ejemplo, interfaz marcadora o enum/record vacío).

record

ConversionStrategy.MapMethodInvocation

Ensamblado: EricksonLopez.Mapper.Generator
public record MapMethodInvocation(string MethodName, bool IsSourceNullable, bool IsTargetNullable, string MethodKey) : ConversionStrategy
Hereda de: ConversionStrategy

Invokes another generated or declared mapper method for nested object mapping.

Miembros (5)

  • constructorMapMethodInvocation
    public MapMethodInvocation(string MethodName, bool IsSourceNullable = false, bool IsTargetNullable = false, string MethodKey = "")

    Initializes a new instance of MapMethodInvocation.

    MethodName: string
    The mapper method name.
    IsSourceNullable: bool
    Whether the source type is nullable.
    IsTargetNullable: bool
    Whether the target type is nullable.
    MethodKey: string
    The unique lookup key of the referenced mapper method.
  • propertyIsSourceNullable
    public bool IsSourceNullable { get; init; }

    Whether the source type is nullable.

  • propertyIsTargetNullable
    public bool IsTargetNullable { get; init; }

    Whether the target type is nullable.

  • propertyMethodKey
    public string MethodKey { get; init; }

    The unique lookup key of the referenced mapper method.

  • propertyMethodName
    public string MethodName { get; init; }

    The mapper method name.

record

ConversionStrategy.Unsupported

Ensamblado: EricksonLopez.Mapper.Generator
public record Unsupported : ConversionStrategy
Hereda de: ConversionStrategy

Indicates that no viable conversion strategy exists between the source and target types.

Miembros (0)

Este tipo declara 0 miembros públicos (por ejemplo, interfaz marcadora o enum/record vacío).

record

ConversionStrategy.ValueObjectMapping

Ensamblado: EricksonLopez.Mapper.Generator
public record ValueObjectMapping(int Kind, ConversionStrategy InnerStrategy, string SourceInnerType, string TargetInnerType, bool IsSourceNullable, bool IsTargetNullable, bool SourceIsValueType) : ConversionStrategy
Hereda de: ConversionStrategy

Maps a strongly-typed ID or value object by unwrapping or wrapping its underlying primitive.

Miembros (8)

  • constructorValueObjectMapping
    public ValueObjectMapping(int Kind, ConversionStrategy InnerStrategy, string SourceInnerType, string TargetInnerType, bool IsSourceNullable = false, bool IsTargetNullable = false, bool SourceIsValueType = false)

    Initializes a new instance of ValueObjectMapping.

    Kind: int
    InnerStrategy: ConversionStrategy
    SourceInnerType: string
    TargetInnerType: string
    IsSourceNullable: bool
    IsTargetNullable: bool
    SourceIsValueType: bool
  • propertyInnerStrategy
    public ConversionStrategy InnerStrategy { get; init; }
  • propertyIsSourceNullable
    public bool IsSourceNullable { get; init; }
  • propertyIsTargetNullable
    public bool IsTargetNullable { get; init; }
  • propertyKind
    public int Kind { get; init; }
  • propertySourceInnerType
    public string SourceInnerType { get; init; }
  • propertySourceIsValueType
    public bool SourceIsValueType { get; init; }
  • propertyTargetInnerType
    public string TargetInnerType { get; init; }

EricksonLopez.Mapper.Mapster#

2
class

MapsterConverter<TSource, TDestination>

Ensamblado: EricksonLopez.Mapper.Mapster
public sealed class MapsterConverter<TSource, TDestination> : IConverter<TSource, TDestination>
Implementa: IConverter<TSource, TDestination>

Provides an adapter that delegates object conversion to Mapster's mapping engine.

Notas:

Native AOT / Trimming Warning: Mapster uses reflection and dynamic code generation internally. This adapter is not compatible with Native AOT or trimmed builds. The package declares `IsAotCompatible=false` and `IsTrimmable=false` to document this constraint. Use a source-generated `IConverter<TSource, TDestination>` for AOT scenarios. Type parameters: TSource: The source object type to convert from.; TDestination: The destination object type to convert to.

Miembros (3)

  • constructorMapsterConverter
    public MapsterConverter()

    Initializes a new instance of the `MapsterConverter<TSource, TDestination>` class using global Mapster configuration.

  • constructorMapsterConverter
    public MapsterConverter(TypeAdapterConfig config)

    Initializes a new instance of the `MapsterConverter<TSource, TDestination>` class with the specified Mapster configuration.

    config: TypeAdapterConfig
    The Mapster configuration instance to use for mapping

    Exceptions: ArgumentNullException: `config` is `null`

  • methodConvert
    public TDestination Convert(TSource source)

    Converts the specified source instance to an instance of `TDestination`.

    source: TSource
    The source instance to convert

    Retorna: The converted instance of `TDestination`.

class

MapsterMapperExtensions

Ensamblado: EricksonLopez.Mapper.Mapster
public static class MapsterMapperExtensions

Provides extension methods for integrating Mapster configuration with `IConverter<TSource, TDestination>`.

Miembros (1)

  • methodUseConverter<TSource, TDestination>
    public static TypeAdapterConfig UseConverter<TSource, TDestination>(this TypeAdapterConfig config, IConverter<TSource, TDestination> converter)

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

    config: this TypeAdapterConfig
    The Mapster configuration instance to configure
    converter: IConverter<TSource, TDestination>
    The converter instance handling the mapping

    Retorna: The configured `TypeAdapterConfig` instance for method chaining.

    Type parameters: TSource: The source type to convert from.; TDestination: The destination type to convert to. Exceptions: ArgumentNullException: `config` or `converter` is `null`

EricksonLopez.Mapper.Result#

1
class

ResultMappingExtensions

Ensamblado: EricksonLopez.Mapper.Result
public static class ResultMappingExtensions

Provides functional mapping extension methods for `Result<T>` instances.

Miembros (4)

  • methodMap<TSource, TDest>
    public static Result<TDest> Map<TSource, TDest>(this Result<TSource> result, Func<TSource, TDest> mapFunc)

    Projects the success value of a `Result<T>` using the specified mapping delegate.

    result: this Result<TSource>
    The source result instance
    mapFunc: Func<TSource, TDest>
    The delegate used to transform the success value

    Retorna: A new `Result<T>` containing the projected value if successful; otherwise, the original error.

    Type parameters: TSource: The source value type.; TDest: The destination value type. Exceptions: ArgumentNullException: `mapFunc` is `null`

  • methodMapAsync<TSource, TDest>
    public static async Task<Result<TDest>> MapAsync<TSource, TDest>(this Task<Result<TSource>> resultTask, Func<TSource, TDest> mapFunc)

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

    resultTask: this Task<Result<TSource>>
    The asynchronous task returning the source result
    mapFunc: Func<TSource, TDest>
    The delegate used to transform the success value

    Retorna: A task representing the asynchronous operation. The task result contains the projected `Result<T>`.

    Type parameters: TSource: The source value type.; TDest: The destination value type. Exceptions: ArgumentNullException: `resultTask` or `mapFunc` is `null`

  • methodMapAsync<TSource, TDest>
    public static async ValueTask<Result<TDest>> MapAsync<TSource, TDest>(this ValueTask<Result<TSource>> resultTask, Func<TSource, TDest> mapFunc)

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

    resultTask: this ValueTask<Result<TSource>>
    The asynchronous value task returning the source result
    mapFunc: Func<TSource, TDest>
    The delegate used to transform the success value

    Retorna: A value task representing the asynchronous operation. The task result contains the projected `Result<T>`.

    Because `ValueTask<TResult>` is a value type (struct), `resultTask` cannot be `null` and no null check is performed for it. Only `mapFunc` is validated. Type parameters: TSource: The source value type.; TDest: The destination value type. Exceptions: ArgumentNullException: `mapFunc` is `null`

  • methodMapList<TSource, TDest>
    public static Result<IReadOnlyList<TDest>> MapList<TSource, TDest>(this Result<IEnumerable<TSource>> result, Func<TSource, TDest> mapFunc)

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

    result: this Result<IEnumerable<TSource>>
    The source result containing the collection
    mapFunc: Func<TSource, TDest>
    The delegate used to transform each item

    Retorna: A new `Result<T>` containing the mapped list if successful; otherwise, the original error.

    Type parameters: TSource: The source element type.; TDest: The destination element type. Exceptions: ArgumentNullException: `mapFunc` is `null`

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.