public TokenizedPropertyNameComparer(IPropertyNameTokenizerResolver tokenizerResolver,
                                      IPropertyNameAbbrevationHandler propertyNameAbbrevationHandler,
                                      IFlashMapperSettings settings)
 {
     this.tokenizerResolver = tokenizerResolver;
     this.propertyNameAbbrevationHandler = propertyNameAbbrevationHandler;
     this.settings = settings;
 }
示例#2
0
 public MappingGenerator(IMappingExpressionAutocompleteService mappingExpressionAutocompleteService,
                         IExpressionCompiler expressionCompiler,
                         IFlashMapperSettings settings)
 {
     this.mappingExpressionAutocompleteService = mappingExpressionAutocompleteService;
     this.expressionCompiler = expressionCompiler;
     this.settings           = settings;
 }
 public PropertyNameComparer(IPropertyPrefixLocator propertyPrefixLocator,
                             IEnumerable <ISpecificPropertyNameComparer> specificPropertyNameComparers,
                             IFlashMapperSettings settings)
 {
     this.propertyPrefixLocator = propertyPrefixLocator;
     this.settings = settings;
     this.specificPropertyNameComparers = specificPropertyNameComparers.ToArray();
 }
示例#4
0
        public IFlashMapperSettings Extend(IFlashMapperSettings defaultSettings, IFlashMapperSettings customSettings)
        {
            var resultUnresolvedBehavior = customSettings.UnresolvedBehavior == UnresolvedPropertyBehavior.Inherit
                ? defaultSettings.UnresolvedBehavior
                : customSettings.UnresolvedBehavior;
            var resultCollisionBehavior = customSettings.CollisionBehavior == SelectSourceCollisionBehavior.Inherit
                ? defaultSettings.CollisionBehavior
                : customSettings.CollisionBehavior;
            var resultSourceNamingConvension      = customSettings.NamingConventions?.Source ?? defaultSettings.NamingConventions.Source;
            var resultDestinationNamingConvension = customSettings.NamingConventions?.Destination ?? defaultSettings.NamingConventions.Destination;

            return(new FlashMapperSettings(resultUnresolvedBehavior, resultCollisionBehavior,
                                           new MapNamingConventionSettings(resultSourceNamingConvension, resultDestinationNamingConvension)));
        }
示例#5
0
 public MultiSourceAutomaticPropertyValueExpressionResolver(IPropertyNameComparer propertyNameComparer,
                                                            IFlashMapperSettings settings)
 {
     this.propertyNameComparer = propertyNameComparer;
     this.settings             = settings;
 }
示例#6
0
 public PropertyValueExpressionResolver(IEnumerable <ISpecificPropertyValueExpressionResolver> specificResolvers,
                                        IFlashMapperSettings settings)
 {
     this.settings          = settings;
     this.specificResolvers = specificResolvers.ToArray();
 }
示例#7
0
 public NamingUnspecifiedPropertyNameComparer(IFlashMapperSettings settings)
 {
     this.settings = settings;
 }
示例#8
0
 public Mapping(Func <TSource, TDestination> buildFunction, Action <TSource, TDestination> mapDataFunction, IFlashMapperSettings settings)
 {
     Settings        = settings;
     MapDataFunction = mapDataFunction;
     BuildFunction   = buildFunction;
 }
示例#9
0
 public IgnoreCasePropertyNameComparer(IFlashMapperSettings settings)
 {
     this.settings = settings;
 }