Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="itemsRepository"></param>
        /// <param name="mappingRepository"></param>
        /// <param name="itemsService"></param>
        /// <param name="mappingManager"></param>
        /// <param name="importManager"></param>
        /// <param name="accountsService"></param>
        /// <param name="projectsService"></param>
        /// <param name="templateService"></param>
        /// <param name="cacheManager"></param>
        /// <param name="gcAccountSettings"></param>
        public UpdateManager(
            IItemsRepository itemsRepository,
            IMappingRepository mappingRepository,
            IItemsService itemsService,
            IMappingManager mappingManager,
            IImportManager importManager,
            IAccountsService accountsService,
            IProjectsService projectsService,
            ITemplatesService templateService,
            ICacheManager cacheManager,
            GCAccountSettings gcAccountSettings)
            : base(accountsService, projectsService, templateService, cacheManager)
        {
            ItemsRepository = itemsRepository;

            MappingRepository = mappingRepository;

            ItemsService = itemsService;

            MappingManager = mappingManager;

            ImportManager = importManager;

            GcAccountSettings = gcAccountSettings;
        }
 public BrandMappingsController(IMappingRepository <BrandMappingViewModel, BrandMappingFilter, BrandMappingRestriction> mappingRepository,
                                IReferencesRepository referencesRepository,
                                ISettingsManager settingsManager,
                                ILogger logger,
                                IMappingSyncLogic mappingSyncLogic) : base(mappingRepository, referencesRepository, settingsManager, logger, mappingSyncLogic)
 {
 }
Esempio n. 3
0
 public ItemPLKindsController(IMappingRepository <ItemPLKindsViewModel, ItemPLKindsFilter, ItemPLKindsRestriction> mappingRepository,
                              IReferencesRepository referencesRepository,
                              ISettingsManager settingsManager,
                              ILogger logger,
                              IMappingSyncLogic mappingSyncLogic) : base(mappingRepository, referencesRepository, settingsManager, logger, mappingSyncLogic)
 {
 }
Esempio n. 4
0
 public EntityMappingsController(IRepository <EntityMapping> repository, IRepository <MappingOrigin> originRepo, IRepository <Entity> entityRepo, IMappingRepository mappingRepository)
 {
     _repository        = repository;
     _originRepo        = originRepo;
     _entityRepo        = entityRepo;
     _mappingRepository = mappingRepository;
 }
Esempio n. 5
0
 public CountriesController(IMemoryPhotoService memoryPhotoService, WorldExplorerContext worldExplorerContext, IRepository <Country> countryRepo, IMappingRepository <CountryDto> repository, IMapper mapper) : base(repository)
 {
     _memoryPhotoService   = memoryPhotoService;
     _worldExplorerContext = worldExplorerContext;
     _countryMapperRepo    = repository;
     _mapper      = mapper;
     _countryRepo = countryRepo;
 }
        public static IEnumerable <TTarget> MapAll <TSource, TTarget>(this IEnumerable <TSource> source,
                                                                      IMappingRepository repo)
        {
            Guard.CheckArgumentNotNull(repo, "repo");
            IExtensibleMapper <TSource, TTarget> mapper = repo.ResolveMapper <TSource, TTarget>();

            return(MapAll(source, mapper));
        }
Esempio n. 7
0
        public static TTarget MapTo <TTarget>(this object source, IMappingRepository repo)
        {
            Guard.CheckArgumentNotNull(source, "source");
            Guard.CheckArgumentNotNull(repo, "repo");
            var mapper = repo.ResolveMapper(source.GetType(), typeof(TTarget));

            return((TTarget)mapper.Map(source));
        }
Esempio n. 8
0
 private void ResetRepositories()
 {
     _transactionRepository = null;
     _accountRepository     = null;
     _analyticsRepository   = null;
     _expenditureRepository = null;
     _reportRepository      = null;
     _mappingRepository     = null;
 }
 public MapsController(ILangRepository langRepo, IMappingRepository mappingRepo, IUpdateRepository updateRepo,
     IUserRepository userRepo, IRestRegexRepository regexRepo)
 {
     Langs = langRepo;
     Mappings = mappingRepo;
     Updates = updateRepo;
     Users = userRepo;
     Regexes = regexRepo;
 }
Esempio n. 10
0
 /// <summary>An IMappingRepository extension method that initializes the mappings.</summary>
 /// <exception cref="ArgumentNullException">
 ///     The <paramref name="initializers" /> parameter is null.
 /// </exception>
 /// <param name="mappingRepo"> The mappingRepo to act on.</param>
 /// <param name="initializers">The initializers.</param>
 public static void InitializeMappings(
     this IMappingRepository mappingRepo,
     IEnumerable <IMappingInitializer> initializers)
 {
     Guard.CheckArgumentNotNull(initializers, "initializers");
     foreach (IMappingInitializer i in initializers)
     {
         i.InitializeMappings(mappingRepo);
     }
 }
Esempio n. 11
0
        /// <summary>An IMappingRepository extension method that initializes the mappings.</summary>
        /// <exception cref="ArgumentNullException">
        ///     The <paramref name="assemblies" /> parameter is null.
        /// </exception>
        /// <param name="mappingRepo"> The mappingRepo to act on.</param>
        /// <param name="assemblies">The initializers.</param>
        public static void InitializeMappings(
            this IMappingRepository mappingRepo,
            IEnumerable <Assembly> assemblies)
        {
            Guard.CheckArgumentNotNull(assemblies, "assemblies");

            IEnumerable <IMappingInitializer> q = from assm in assemblies
                                                  from t in assm.GetTypes()
                                                  where !t.IsAbstract
                                                  where typeof(IMappingInitializer).IsAssignableFrom(t)
                                                  select(IMappingInitializer) Activator.CreateInstance(t);

            InitializeMappings(mappingRepo, q);
        }
Esempio n. 12
0
 public MappingManager(
     IMappingRepository mappingRepository,
     IAccountsService accountsService,
     IProjectsService projectsService,
     ITemplatesService templateService,
     IItemsService itemService,
     ICacheManager cacheManager,
     GCAccountSettings accountSettings)
     : base(accountsService, projectsService, templateService, cacheManager)
 {
     AccountSettings   = accountSettings;
     MappingRepository = mappingRepository;
     ItemService       = itemService;
     TemplateService   = templateService;
 }
 public ImportManager(
     IItemsRepository itemsRepository,
     IMappingRepository mappingRepository,
     IItemsService itemsService,
     IAccountsService accountsService,
     IProjectsService projectsService,
     ITemplatesService templateService,
     ICacheManager cacheManager,
     GCAccountSettings gcAccountSettings)
     : base(accountsService, projectsService, templateService, cacheManager, gcAccountSettings)
 {
     ItemsRepository   = itemsRepository;
     MappingRepository = mappingRepository;
     ItemsService      = itemsService;
 }
Esempio n. 14
0
 public UsersController(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     IMappingRepository <CompanyDto> companyRepository,
     IMappingRepository <CustomerDto> customerRepository,
     IMappingRepository <DriverDto> driverRepository,
     IMappingRepository <AddressDto> addressRepository)
 {
     _userManager        = userManager;
     _signInManager      = signInManager;
     _companyRepository  = companyRepository;
     _customerRepository = customerRepository;
     _driverRepository   = driverRepository;
     _addressRepository  = addressRepository;
 }
 public MappingManager(
     IMappingRepository mappingRepository,
     IAccountsService accountsService,
     IProjectsService projectsService,
     ITemplatesService templateService,
     IItemsService itemService,
     ICacheManager cacheManager,
     ILogger logger,
     GCAccountSettings accountSettings)
     : base(accountsService, projectsService, templateService, cacheManager, accountSettings)
 {
     MappingRepository = mappingRepository;
     ItemService       = itemService;
     Log             = logger ?? new NullLogger();
     TemplateService = templateService;
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="itemsRepository"></param>
 /// <param name="mappingRepository"></param>
 /// <param name="itemsService"></param>
 /// <param name="accountsService"></param>
 /// <param name="projectsService"></param>
 /// <param name="templateService"></param>
 /// <param name="cacheManager"></param>
 /// <param name="logger"></param>
 /// <param name="gcAccountSettings"></param>
 public UpdateManager(
     IItemsRepository itemsRepository,
     IMappingRepository mappingRepository,
     IItemsService itemsService,
     IAccountsService accountsService,
     IProjectsService projectsService,
     ITemplatesService templateService,
     ICacheManager cacheManager,
     ILogger logger,
     GCAccountSettings gcAccountSettings)
     : base(accountsService, projectsService, templateService, cacheManager, gcAccountSettings)
 {
     ItemsRepository   = itemsRepository;
     MappingRepository = mappingRepository;
     ItemsService      = itemsService;
     Log = logger ?? new NullLogger();
 }
Esempio n. 17
0
 public MigrationSegmentRunner(
     IOperationExecutive operationExecutive,
     IServiceProvider <TEntity> serviceProvider,
     ISafeMetadataProvider <TEntity> safeMetadataProvider,
     IParameterProvider parameterProvider,
     IMappingRepository <TEntity> mappingRepository,
     IProcessor <TEntity> processor,
     IEventDispatcher <TEntity> eventDispatcher)
 {
     this.operationExecutive   = operationExecutive;
     this.serviceProvider      = serviceProvider;
     this.safeMetadataProvider = safeMetadataProvider;
     this.parameterProvider    = parameterProvider;
     this.mappingRepository    = mappingRepository;
     this.processor            = processor;
     this.eventDispatcher      = eventDispatcher;
 }
Esempio n. 18
0
        protected virtual IMapper <TSource, TTarget> CreateMapper(Type[] innerMappers)
        {
            IMappingRepository repo = null;

            if (innerMappers != null)
            {
                var options = new MappingOptions(innerMappers);
                repo = new MappingRepository(options);
            }
            else
            {
                repo = new MappingRepository();
            }

            var mapper = repo.ResolveMapper <TSource, TTarget>();

            this.AddMappingActions(mapper);
            return(mapper);
        }
Esempio n. 19
0
 public Processor(
     IContext context,
     IOperationExecutive operationExecutive,
     ISafeMetadataProvider <TEntity> safeMetadataProvider,
     IServiceProvider <TEntity> serviceProvider,
     IMappingRepository <TEntity> mappingRepository,
     IPreprocessor <TEntity> preprocessor,
     IDeduplicator <TEntity> deduplicator,
     IHashingSerializer <TEntity> hashingSerializer,
     IGateway <TEntity> gateway,
     IEventHub <TEntity> eventHub)
 {
     this.context              = context;
     this.operationExecutive   = operationExecutive;
     this.safeMetadataProvider = safeMetadataProvider;
     this.serviceProvider      = serviceProvider;
     this.mappingRepository    = mappingRepository;
     this.preprocessor         = preprocessor;
     this.deduplicator         = deduplicator;
     this.hashingSerializer    = hashingSerializer;
     this.gateway              = gateway;
     this.eventHub             = eventHub;
 }
 public MappingService(IMappingRepository mappingRepository)
 {
     this.mappingRepository = mappingRepository;
 }
 public EntitySessionBuilder(IMappingRepository repository)
 {
     _repository = repository;
 }
Esempio n. 22
0
 public DriversController(IMappingRepository <DriverDto> driverMappingRepository, IMapper mapper, IHubContext <TaxiHub> hub) : base(driverMappingRepository)
 {
     _hub    = hub;
     _mapper = mapper;
 }
Esempio n. 23
0
 public CustomersController(IMappingRepository <CustomerDto> customerMappingRepository) : base(customerMappingRepository)
 {
 }
Esempio n. 24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MapperConstructionInfo"/> class. 
 /// </summary>
 /// <param name="parentRepo">
 /// The parent repo.
 /// </param>
 public MapperConstructionInfo(IMappingRepository parentRepo)
 {
     this.ParentRepo = parentRepo;
 }
Esempio n. 25
0
 /// <summary>An IMappingRepository extension method that initializes the mappings.</summary>
 public static void InitializeMappings(this IMappingRepository mappingRepo)
 {
     mappingRepo.InitializeMappings(AppDomain.CurrentDomain.GetAssemblies());
 }
Esempio n. 26
0
 public MappingService(IMappingRepository mappingRepository)
 {
     _mappingRepository = mappingRepository;
 }
Esempio n. 27
0
 public void InitializeMappings(IMappingRepository mappingRepo)
 {
     Repos.Add(mappingRepo);
 }
Esempio n. 28
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MapperConstructionInfo"/> class.
 /// </summary>
 /// <param name="parentRepo">
 /// The parent repo.
 /// </param>
 public MapperConstructionInfo(IMappingRepository parentRepo)
 {
     this.ParentRepo = parentRepo;
 }
Esempio n. 29
0
 public OrdersController(IMappingRepository <OrderDto> orderMappingRepository, IHubContext <TaxiHub> hub) : base(orderMappingRepository)
 {
     _hub = hub;
 }
 public PagesController(IPageRepository pages, IMappingRepository mappings)
 {
     _pages = pages;
     _mappings = mappings;
 }
Esempio n. 31
0
 public void InitializeMappings(IMappingRepository mappingRepo)
 {
     Repos.Add(mappingRepo);
 }
Esempio n. 32
0
 public AutomationController(IMappingRepository mappingRepository)
 {
     //_entityRepo = entityRepo;
     _mappingRepository = mappingRepository;
 }
Esempio n. 33
0
 public CompaniesController(IMappingRepository <CompanyDto> companyMappingRepository) :
     base(companyMappingRepository)
 {
 }
Esempio n. 34
0
 /// <summary>
 ///     Asynchronously maps the values on object the to a target type.
 /// </summary>
 /// <typeparam name="TTarget">The type of the target.</typeparam>
 /// <param name="source">The source object.</param>
 /// <param name="repo">The repository that will provide the mapper.</param>
 /// <returns>
 ///     The object representing the asynchronous operation. The task result will contain a
 ///     filled target object.
 /// </returns>
 public static async Task <TTarget> MapToAsync <TTarget>(this object source, IMappingRepository repo)
 {
     return(await Task.Run(() => source.MapTo <TTarget>(repo)));
 }
 public PageProcessor(IPageRepository pages, ILangRepository langs, IMappingRepository mappings)
 {
     Pages = pages;
     Langs = langs;
     Mappings = mappings;
 }
Esempio n. 36
0
 public SpotifyPlaylistsController(IMappingRepository <SpotifyPlaylistDto> playlistMappingRepo, WorldExplorerContext worldExplorerContext) : base(playlistMappingRepo)
 {
     _playlistMappingRepo  = playlistMappingRepo;
     _spotify              = new Spotify();
     _worldExplorerContext = worldExplorerContext;
 }