Exemplo 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)
 {
 }
Exemplo n.º 3
0
 public ItemPLKindsController(IMappingRepository <ItemPLKindsViewModel, ItemPLKindsFilter, ItemPLKindsRestriction> mappingRepository,
                              IReferencesRepository referencesRepository,
                              ISettingsManager settingsManager,
                              ILogger logger,
                              IMappingSyncLogic mappingSyncLogic) : base(mappingRepository, referencesRepository, settingsManager, logger, mappingSyncLogic)
 {
 }
Exemplo n.º 4
0
 public EntityMappingsController(IRepository <EntityMapping> repository, IRepository <MappingOrigin> originRepo, IRepository <Entity> entityRepo, IMappingRepository mappingRepository)
 {
     _repository        = repository;
     _originRepo        = originRepo;
     _entityRepo        = entityRepo;
     _mappingRepository = mappingRepository;
 }
Exemplo 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;
 }
Exemplo n.º 6
0
        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));
        }
Exemplo 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));
        }
Exemplo 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;
 }
Exemplo 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);
     }
 }
Exemplo 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);
        }
Exemplo 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;
 }
Exemplo n.º 13
0
 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;
 }
Exemplo 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;
 }
Exemplo n.º 15
0
 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;
 }
Exemplo n.º 16
0
 /// <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();
 }
Exemplo 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;
 }
Exemplo 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);
        }
Exemplo 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;
 }
Exemplo n.º 20
0
 public MappingService(IMappingRepository mappingRepository)
 {
     this.mappingRepository = mappingRepository;
 }
 public EntitySessionBuilder(IMappingRepository repository)
 {
     _repository = repository;
 }
Exemplo n.º 22
0
 public DriversController(IMappingRepository <DriverDto> driverMappingRepository, IMapper mapper, IHubContext <TaxiHub> hub) : base(driverMappingRepository)
 {
     _hub    = hub;
     _mapper = mapper;
 }
Exemplo n.º 23
0
 public CustomersController(IMappingRepository <CustomerDto> customerMappingRepository) : base(customerMappingRepository)
 {
 }
Exemplo 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;
 }
Exemplo 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());
 }
Exemplo n.º 26
0
 public MappingService(IMappingRepository mappingRepository)
 {
     _mappingRepository = mappingRepository;
 }
Exemplo n.º 27
0
 public void InitializeMappings(IMappingRepository mappingRepo)
 {
     Repos.Add(mappingRepo);
 }
Exemplo 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;
 }
Exemplo 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;
 }
Exemplo n.º 31
0
 public void InitializeMappings(IMappingRepository mappingRepo)
 {
     Repos.Add(mappingRepo);
 }
Exemplo n.º 32
0
 public AutomationController(IMappingRepository mappingRepository)
 {
     //_entityRepo = entityRepo;
     _mappingRepository = mappingRepository;
 }
Exemplo n.º 33
0
 public CompaniesController(IMappingRepository <CompanyDto> companyMappingRepository) :
     base(companyMappingRepository)
 {
 }
Exemplo 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)));
 }
Exemplo n.º 35
0
 public PageProcessor(IPageRepository pages, ILangRepository langs, IMappingRepository mappings)
 {
     Pages = pages;
     Langs = langs;
     Mappings = mappings;
 }
Exemplo n.º 36
0
 public SpotifyPlaylistsController(IMappingRepository <SpotifyPlaylistDto> playlistMappingRepo, WorldExplorerContext worldExplorerContext) : base(playlistMappingRepo)
 {
     _playlistMappingRepo  = playlistMappingRepo;
     _spotify              = new Spotify();
     _worldExplorerContext = worldExplorerContext;
 }