Пример #1
0
 protected override void Configure()
 {
     SourceMemberNamingConvention = new PascalCaseNamingConvention();
     DestinationMemberNamingConvention = new LowerUnderscoreNamingConvention();
     CreateMap<SchemaField, SchemaFieldDto>();
     CreateMap<Schema, SchemaDto>();
 }
 public FormatterExpression(Func <Type, IValueFormatter> formatterCtor)
 {
     _formatterCtor = formatterCtor;
     SourceMemberNamingConvention      = new PascalCaseNamingConvention();
     DestinationMemberNamingConvention = new PascalCaseNamingConvention();
     RecognizePrefixes("Get");
     AllowNullDestinationValues = true;
 }
Пример #3
0
 public FormatterExpression(Func <Type, IValueFormatter> formatterCtor)
 {
     _formatterCtor = formatterCtor;
     SourceMemberNamingConvention      = new PascalCaseNamingConvention();
     DestinationMemberNamingConvention = new PascalCaseNamingConvention();
     SourceMemberNameTransformer       = s => Regex.Replace(s, "(?:^Get)?(.*)", "$1");
     DestinationMemberNameTransformer  = s => s;
     AllowNullDestinationValues        = true;
 }
Пример #4
0
 public FormatterExpression(Func <Type, IValueFormatter> formatterCtor)
 {
     _formatterCtor = formatterCtor;
     SourceMemberNamingConvention      = new PascalCaseNamingConvention();
     DestinationMemberNamingConvention = new PascalCaseNamingConvention();
     RecognizePrefixes("Get");
     AllowNullDestinationValues = true;
     ConstructorMappingEnabled  = true;
     IncludeSourceExtensionMethods(typeof(Enumerable).Assembly);
 }
Пример #5
0
        protected Profile()
        {
            ProfileName = GetType().FullName;

            AddMemberConfiguration()
            .AddMember <NameSplitMember>()
            .AddName <PrePostfixName>(_ => _.AddStrings(p => p.Prefixes, "Get"));

            SourceMemberNamingConvention      = new PascalCaseNamingConvention();
            DestinationMemberNamingConvention = new PascalCaseNamingConvention();
        }
Пример #6
0
        protected override void Configure()
        {
            SourceMemberNamingConvention = new LowerUnderscoreNamingConvention();
            DestinationMemberNamingConvention = new PascalCaseNamingConvention();
            CreateMap<TrueVaultResponseDto, TrueVaultResponse>();
            CreateMap<InnerErrorDto, InnerError>();
            CreateMap<ErrorResponseDto, ErrorResponse>();
            #region JSON Store
            CreateMap<DocumentSaveSuccessResponseDto, DocumentSaveSuccessResponse>();
            CreateMap<DocumentGetResponseDto, DocumentResponse>();
            CreateMap<MultiDocumentGetResponseDto, MultiDocumentResponse>();
            CreateMap<DocumentGetListResponseDto, DocumentGetListResponse>();
            CreateMap<DocumentGetListDataDto, DocumentGetListData>();
            CreateMap<DocumentGetListItemDto, DocumentGetListItem>();
            #endregion

            CreateMap<SchemaFieldDto, SchemaField>();
            //CreateMap<SchemaDto, Schema>();
            //CreateMap<SchemaGetResponseDto, SchemaGetResponse>();
            //CreateMap<SchemaGetListResponseDto, SchemaGetListResponse>();
            //CreateMap<SchemaSaveResponseDto, SchemaSaveResponse>();
            //CreateMap<SchemaSaveSuccessResponseDto, SchemaSaveSuccessResponse>();
        }
Пример #7
0
 protected override void Configure()
 {
     base.Configure();
     SourceMemberNamingConvention = new LowerUnderscoreNamingConvention();
     DestinationMemberNamingConvention = new PascalCaseNamingConvention();
 }
 public NameSplitMember()
 {
     SourceMemberNamingConvention      = new PascalCaseNamingConvention();
     DestinationMemberNamingConvention = new PascalCaseNamingConvention();
 }