Table of Contents

Interface INamingConvention

Namespace
Mapperion
Assembly
Mapperion.dll

Says how the member names on one side of a map are written, so that names following two different spellings still match each other.

public interface INamingConvention

Remarks

A source coming from a database or a JSON payload often spells its members first_name while the destination spells them FirstName. Telling each side which spelling it uses is enough for the conventions to see those as the same name, with no ForMember per property.

The shape is AutoMapper's, so a convention written against it compiles here unchanged. Its one member is the separator that divides words in a name: null for a spelling with no separator at all, "" for one that separates by capital letters, and the separator itself for anything else.

Member names are CLR identifiers, so the only separator that can appear in one is the underscore. A convention of your own is therefore for its variants, such as the doubled separator some code generators emit.

Properties

SeparatorCharacter

Gets the text that separates the words of a member name, or null when names are taken exactly as written.