Interface IMapperConfigurationExpression
- Namespace
- Mapperion
- Assembly
- Mapperion.dll
The surface handed to the configuration callback. Every setting here applies to all maps unless a single map overrides it.
public interface IMapperConfigurationExpression
Properties
- AllowNullCollections
Gets or sets a value indicating whether a null source collection maps to null.
- AllowNullDestinationValues
Gets or sets a value indicating whether null values are written to the destination.
- DestinationMemberNamingConvention
Gets or sets how the destination spells its member names.
- EnumMapping
Gets or sets how enum values are translated.
- IncludeFields
Gets or sets a value indicating whether public fields are considered alongside properties.
- IncludeSourceMethods
Gets or sets a value indicating whether parameterless methods are considered as source members.
- MaxFlatteningDepth
Gets or sets how many levels the flattening convention walks.
- MemberListValidation
Gets or sets which side must be fully covered for a map to validate.
- NameComparison
Gets or sets how member names are compared when matching by convention.
- ReadingThroughAMemberUsesIt
Whether reading through a member counts as using it, when validating against the source member list. On by default.
- RecursionLimit
Gets or sets how many levels deep a map that can reach itself may recurse before the operation fails with RecursionLimitException. Zero or less removes the ceiling, which brings back an uncatchable stack overflow on a looping graph.
- SourceMemberNamingConvention
Gets or sets how the source spells its member names, so that a source written
first_namematches a destination writtenFirstName.
- ValidateOnBuild
Gets or sets a value indicating whether the configuration is validated when built.
Methods
- AddProfile(Profile)
Registers an already-built profile.
- AddProfile<TProfile>()
Registers a profile by type.
- AddProfiles(params Assembly[])
Registers every concrete Profile found in the given assemblies.
- CreateMap(Type, Type)
Declares a map with types rather than type arguments. Pass two generic type definitions, such as
typeof(Page<>)andtypeof(PageDto<>), to declare a template the engine closes the first time a matching pair is mapped.
- CreateMap<TSource, TDestination>()
Declares a map between two types.
- RecognizeDestinationPostfixes(params string[])
Strips these suffixes from destination member names before matching.
- RecognizeDestinationPrefixes(params string[])
Strips these prefixes from destination member names before matching.
- RecognizeSourcePostfixes(params string[])
Strips these suffixes from source member names before matching.
- RecognizeSourcePrefixes(params string[])
Strips these prefixes from source member names before matching.