Riok.Mapperly by Mapperly Contributors, Lars Tönz, Manuel Allenspach

<PackageReference Include="Riok.Mapperly" Version="3.5.0-next.1" />

 MappingConversionType

public enum MappingConversionType
A MappingConversionType represents a type of conversion how one type can be converted into another.
All = -1

Enables all supported conversions.

Use the constructor of the target type, which accepts the source type as a single parameter.

If the source is a DateTime and the target is a DateOnly uses the `FromDateTime` method on the target type with the source as single parameter.

If the source is a DateTime and the target is a TimeOnly uses the `FromDateTime` method on the target type with the source as single parameter.

Dictionary = 4096

If the source and targets are IDictionary<T, U> or IReadOnlyDictionary<T, U>. Maps each KeyValuePair<T, U> individually.

Enumerable = 2048

If the source and the target is an IEnumerable<T> Maps each element individually.

EnumToEnum = 128

If the source is an Enum and the target is another Enum, map it according to the EnumMappingStrategy.

If the source is an Enum and the target is a String, uses the name of the enum member to convert it to a string.

An explicit cast from the source type to the target type.

An implicit cast from the source type to the target type.

Memory = 16384

If the source or target is a Memory<T> or ReadOnlyMemory<T> Maps each element individually.

None = 0

None.

If the source type is a String, uses a a static visible method named `Parse` on the target type with a return type equal to the target type and a string as single parameter.

Queryable = 1024

If the source and the target is a IQueryable<T>. Only uses object initializers and inlines the mapping code.

Span = 8192

If the source or target is a Span<T> or ReadOnlySpan<T> Maps each element individually.

If the target is an Enum and the source is a String, parses the string to match the name of an enum member.

If the target type is a String, uses the `ToString` method on the source type.

Tuple = 32768

If the target is a ValueTuple<T, U> or tuple expression (A: 10, B: 12). Supports positional and named mapping. Only uses ValueTuple<T, U> in IQueryable<T>.