record
ConstructionStrategy.FactoryMethod
Assembly: EricksonLopez.Mapper.Generatorpublic record FactoryMethod(string MethodName, EquatableArray<ParameterMapping> Parameters) : ConstructionStrategy
Inherits: ConstructionStrategy
Instantiates the target type via a static factory method.
Members (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
Assembly: EricksonLopez.Mapper.Generatorpublic record ObjectInitializer : ConstructionStrategy
Inherits: ConstructionStrategy
Instantiates the target type via a parameterless constructor and object initializer.
Members (0)
This type declares 0 public members (e.g. marker interface or empty enum/record).
record
ConstructionStrategy.ParameterizedConstructor
Assembly: EricksonLopez.Mapper.Generatorpublic record ParameterizedConstructor(EquatableArray<ParameterMapping> Parameters) : ConstructionStrategy
Inherits: ConstructionStrategy
Instantiates the target type via a parameterized constructor.
Members (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
Assembly: EricksonLopez.Mapper.Generatorpublic record Unsupported(string Reason) : ConstructionStrategy
Inherits: ConstructionStrategy
Indicates that no viable construction strategy was found for the target type.
Members (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
Assembly: EricksonLopez.Mapper.Generatorpublic record BuiltinConversion(string ExpressionTemplate) : ConversionStrategy
Inherits: 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})".
Members (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
Assembly: EricksonLopez.Mapper.Generatorpublic record CustomMethod(string MethodName) : ConversionStrategy
Inherits: ConversionStrategy
Invokes a user-defined custom mapping or converter method.
Members (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
Assembly: EricksonLopez.Mapper.Generatorpublic record DictionaryMapping(ConversionStrategy KeyStrategy, ConversionStrategy ValueStrategy, string SourceKeyType, string TargetKeyType, string SourceValueType, string TargetValueType, bool SourceHasCount) : ConversionStrategy
Inherits: ConversionStrategy
Maps a dictionary source to a target dictionary type by converting keys and values.
Members (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
Assembly: EricksonLopez.Mapper.Generatorpublic record DirectAssignment : ConversionStrategy
Inherits: ConversionStrategy
Assigns the source expression directly to the target without conversion.
Members (0)
This type declares 0 public members (e.g. marker interface or empty enum/record).
record
ConversionStrategy.EnumToEnumMapping
Assembly: EricksonLopez.Mapper.Generatorpublic record EnumToEnumMapping(string TargetEnumType, EquatableArray<string> UnmappedSourceMembers) : ConversionStrategy
Inherits: ConversionStrategy
Maps a source enum to a target enum using compile-time switch expressions.
Members (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
Assembly: EricksonLopez.Mapper.Generatorpublic 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
Inherits: ConversionStrategy
Maps an enumerable or collection source to a target collection type.
Members (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
Assembly: EricksonLopez.Mapper.Generatorpublic record ExplicitCast : ConversionStrategy
Inherits: ConversionStrategy
Applies an explicit C# cast expression to convert the source value.
Members (0)
This type declares 0 public members (e.g. marker interface or empty enum/record).
record
ConversionStrategy.MapMethodInvocation
Assembly: EricksonLopez.Mapper.Generatorpublic record MapMethodInvocation(string MethodName, bool IsSourceNullable, bool IsTargetNullable, string MethodKey) : ConversionStrategy
Inherits: ConversionStrategy
Invokes another generated or declared mapper method for nested object mapping.
Members (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
Assembly: EricksonLopez.Mapper.Generatorpublic record Unsupported : ConversionStrategy
Inherits: ConversionStrategy
Indicates that no viable conversion strategy exists between the source and target types.
Members (0)
This type declares 0 public members (e.g. marker interface or empty enum/record).
record
ConversionStrategy.ValueObjectMapping
Assembly: EricksonLopez.Mapper.Generatorpublic record ValueObjectMapping(int Kind, ConversionStrategy InnerStrategy, string SourceInnerType, string TargetInnerType, bool IsSourceNullable, bool IsTargetNullable, bool SourceIsValueType) : ConversionStrategy
Inherits: ConversionStrategy
Maps a strongly-typed ID or value object by unwrapping or wrapping its underlying primitive.
Members (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; }