private MappingConfigurator <TSource, TTarget> UseNamePatterns(params string[] patterns) { MapperContext.Naming.Add(ConfiguredNamingPattern.Create(patterns, ConfigInfo)); return(this); }
/// <summary> /// Expect members of all source and target types to potentially match the given name <paramref name="patterns"/>. /// The patterns will be used to find the part of a name which should be used to match a source and target member. /// </summary> /// <param name="patterns"> /// The Regex patterns to check against source and target member names. Each pattern is expected to start with the /// ^ character, end with the $ character and contain a single capturing group wrapped in parentheses, e.g. ^__(.+)__$ /// </param> /// <returns> /// An <see cref="IGlobalMappingSettings"/>, with which to globally configure other mapping aspects. /// </returns> public IGlobalMappingSettings UseNamePatterns(params string[] patterns) { MapperContext.Naming.Add(ConfiguredNamingPattern.Create(patterns, GlobalConfigInfo)); return(this); }