Esempio n. 1
0
        public EntityTranslateBuilder(TranslateFactoryContext <TSchema> context)
        {
            ImplementationType = context.GetImplementationType <TResult>();
            _context           = context;

            _propertyTranslaters = new Dictionary <string, IPropertyTranslateBuilder <TResult, TInput, TSchema> >();

            CopyPropertyVisitor    = new EntityCopyTranslateBuilderPropertyVisitor <TResult, TInput, TSchema>(this);
            MissingPropertyVisitor = new EntityMissingTranslateBuilderPropertyVisitor <TResult, TInput, TSchema>(this);

            ITranslateBuilderPropertyVisitor <TSchema> DefaultPropertyVisitor() => CopyPropertyVisitor;

            _defaultPropertyVisitor = DefaultPropertyVisitor;

            _propertyScanner = new EntityTranslateBuilderPropertyScanner <TResult, TInput, TSchema>();
        }
Esempio n. 2
0
 public Type GetImplementationType <T>()
 {
     return(_context.GetImplementationType <T>());
 }