public CatalogImportJobHomeViewModel( IRepositoryFactory <IImportRepository> importRepository, IViewModelsFactory <ICreateImportJobViewModel> wizardVmFactory, IViewModelsFactory <IImportJobRunViewModel> runVmFactory, IViewModelsFactory <IImportJobViewModel> itemVmFactory, IImportJobEntityFactory entityFactory, IAuthenticationContext authContext, IImportService importService, SubTabsDefaultViewModel parentViewModel) : base(importRepository, wizardVmFactory, runVmFactory, itemVmFactory, entityFactory, authContext, importService, parentViewModel) { AvailableImporters = new[] { ImportEntityType.Product, ImportEntityType.Bundle, ImportEntityType.Category, ImportEntityType.Association, ImportEntityType.DynamicKit, ImportEntityType.Package, ImportEntityType.Sku, ImportEntityType.ItemRelation, ImportEntityType.ItemAsset, ImportEntityType.Seo }; DefaultImporter = AvailableImporters.First().ToString(); }
public HomeController(IEmailSender emailSender, IBusinessStreamRepository businessRepository, IProvinceRepository provinceRepository, IRepository <VisaCategory> visaCategoryRepository, UserManager <ApplicationUser> userManager, IImportService importService, IHostingEnvironment hostingEnvironment, IJobSeekerRepository jobSeekerRepository, SignInManager <ApplicationUser> signInManager, IEmailService emailService, IAPICallingService aPICallingService, IJobRepository jobRepository, IPostalCodeRepository postalCodeRepository, IMaketoAPICallingService maketoAPICallingService ) { _emailSender = emailSender; _userManager = userManager; _visaCategoryRepository = visaCategoryRepository; _businessRepository = businessRepository; _provinceRepository = provinceRepository; _importService = importService; _hostingEnvironment = hostingEnvironment; _jobSeekerRepository = jobSeekerRepository; _signInManager = signInManager; _emailService = emailService; _aPICallingService = aPICallingService; _jobRepository = jobRepository; _postalCodeRepository = postalCodeRepository; _maketoAPICallingService = maketoAPICallingService; }
public ImportController( IImportService importService, IBankAccountService bankAccountService) { _importService = importService; _bankAccountService = bankAccountService; }
public CatalogImportJobHomeViewModel( IRepositoryFactory<IImportRepository> importRepository, IViewModelsFactory<ICreateImportJobViewModel> wizardVmFactory, IViewModelsFactory<IImportJobRunViewModel> runVmFactory, IViewModelsFactory<IImportJobViewModel> itemVmFactory, IImportJobEntityFactory entityFactory, IAuthenticationContext authContext, IImportService importService, SubTabsDefaultViewModel parentViewModel) : base(importRepository, wizardVmFactory, runVmFactory, itemVmFactory, entityFactory, authContext, importService, parentViewModel) { AvailableImporters = new[] { ImportEntityType.Product, ImportEntityType.Bundle, ImportEntityType.Category, ImportEntityType.Association, ImportEntityType.DynamicKit, ImportEntityType.Package, ImportEntityType.Sku, ImportEntityType.ItemRelation, ImportEntityType.ItemAsset, ImportEntityType.Seo }; DefaultImporter = AvailableImporters.First().ToString(); }
public MonitorService(IFileService fileService, IImportService importService) { _fileService = fileService; _importService = importService; _files = new HashSet <string>(); }
public CommandHandler(IAggregationService aggregationService, IDownloadService downloadService, IImportService importService) { _aggregationService = aggregationService; _downloadService = downloadService; _importService = importService; }
public ImportJobHomeViewModel( IRepositoryFactory <IImportRepository> importRepository, IViewModelsFactory <ICreateImportJobViewModel> wizardVmFactory, IViewModelsFactory <IImportJobRunViewModel> runVmFactory, IViewModelsFactory <IImportJobViewModel> itemVmFactory, IImportJobEntityFactory entityFactory, IAuthenticationContext authContext, IImportService importService, SubTabsDefaultViewModel parentViewModel ) { _entityFactory = entityFactory; _importRepository = importRepository; _wizardVmFactory = wizardVmFactory; _runVmFactory = runVmFactory; _itemVmFactory = itemVmFactory; _authContext = authContext; _parentViewModel = parentViewModel; _importService = importService; AvailableImporters = (ImportEntityType[])Enum.GetValues(typeof(ImportEntityType)); InitCommands(); ViewTitle = new ViewTitleBase() { Title = "Catalogs", SubTitle = "MERCHANDISE MANAGEMENT".Localize() }; }
public frmDashboard(IPersonManager personManager, IImportService importService) { _personManager = personManager; _importService = importService; InitializeComponent(); }
public ImportPriceCommand(ImportDataToolViewModel importVM, IStaticReferences staticReferences, IImportService importService) { _importVM = importVM; _importService = importService; _staticReferences = staticReferences; }
public GStandardImportService(IImportService<ICommercialProduct> commercialProductImportService, IImportService<IComposition> compositionImportService, IImportService<IGenericComposition> genericCompositionImportService, IImportService<IGenericName> genericNameImportService, IImportService<IGenericProduct> genericProductImportService, IImportService<IName> nameImportService, IImportService<IPrescriptionProduct> prescriptionProductImportService, IImportService<IProduct> productImportService, IImportService<IThesauriTotal> thesauriTotalImportService) { Contract.Requires<ArgumentNullException>(commercialProductImportService != null, "commercialProductImportService"); Contract.Requires<ArgumentNullException>(compositionImportService != null, "compositionImportService"); Contract.Requires<ArgumentNullException>(genericCompositionImportService != null, "genericCompositionImportService"); Contract.Requires<ArgumentNullException>(genericNameImportService != null, "genericNameImportService"); Contract.Requires<ArgumentNullException>(genericProductImportService != null, "genericProductImportService"); Contract.Requires<ArgumentNullException>(nameImportService != null, "nameImportService"); Contract.Requires<ArgumentNullException>(prescriptionProductImportService != null, "prescriptionProductImportService"); Contract.Requires<ArgumentNullException>(productImportService != null, "productImportService"); //TODO relationBetweenName Contract.Requires<ArgumentNullException>(thesauriTotalImportService != null, "thesauriTotalImportService"); _importServices = new List<IImportService>{ commercialProductImportService, compositionImportService, genericCompositionImportService, genericNameImportService, genericProductImportService, nameImportService, prescriptionProductImportService, productImportService, thesauriTotalImportService }; }
//private readonly IHttpContextAccessor _httpContextAccessor; //private ISession _session => _httpContextAccessor.HttpContext.Session; /// <summary> /// Hàm khởi tạo /// </summary> /// <param name="accountService"></param> /// <param name="LogLoginService"></param> /// <returns></returns> public ProductController(IProductService productService, ICategoryService categoryService, IUnitService unitService, IImportService importService) { this._productService = productService; this._categoryService = categoryService; this._unitService = unitService; this._importService = importService; }
public ImportController() { importService = new ImportService(); questionService = new QuestionService(); logService = new LogService(); courseService = new CourseService(); }
public MapViewModel(IWindowService windowService, IMapService mapService, IPackageService packageService, IImportService importService, ILoadService loadService, IFormService formService, IClientConfigurationProvider clientConfigurationProvider) { this.loadService = loadService; this.formService = formService; this.clientConfigurationProvider = clientConfigurationProvider; this.windowService = windowService; this.JSEventContainer = formService; this.ScriptingObject = mapService; loadService.PackageLoaded += LoadServiceOnPackageLoaded; loadService.PackageUnloaded += LoadServiceOnPackageUnLoaded; loadService.PackageDescriptorChanged += new EventHandler(packageService_PackageDescriptorChanged); loadService.MobileChanged += loadServiceMobileChanged; OpenHelpWindowCommand = new DelegateCommand(() => windowService.OpenHelpWindow(HelpFileNames.ZustandsabschnittMapHelpPage)); //OpenLegendWindowAllCommand = new DelegateCommand(() => windowService.OpenLegendWindowAll()); //all changes to an Observable Collection must be done by the same Thread it was created by, becaus of Thread Affinity Action action = new Action(() => { InspektionsroutenDictionary = new CollectionView(new ObservableCollection <XMLKeyValuePair <Guid, string> >()); }); Application.Current.Dispatcher.Invoke(action); this.IsVisible = false; this.setDefaultHtmlSource(); mapService.ShowLegend += onOpenLegendWindow; }
public WordListsViewModel(IProjectService projectService, IDialogService dialogService, IImportService importService, IExportService exportService, IAnalysisService analysisService, WordListsVarietyViewModel.Factory varietyFactory) : base("Word lists") { _projectService = projectService; _dialogService = dialogService; _importService = importService; _exportService = exportService; _analysisService = analysisService; _varietyFactory = varietyFactory; Messenger.Default.Register <SwitchViewMessage>(this, HandleSwitchView); Messenger.Default.Register <DomainModelChangedMessage>(this, HandleDomainModelChanged); _projectService.ProjectOpened += _projectService_ProjectOpened; _findCommand = new RelayCommand(Find); TaskAreas.Add(new TaskAreaItemsViewModel("Common tasks", new TaskAreaCommandViewModel("Add a new variety", new RelayCommand(AddNewVariety)), new TaskAreaCommandViewModel("Add a new meaning", new RelayCommand(AddNewMeaning)), new TaskAreaCommandViewModel("Find words", _findCommand), new TaskAreaCommandViewModel("Import word lists from file", new RelayCommand(ImportFromFile)), new TaskAreaCommandViewModel("Import word lists from clipboard", new RelayCommand(ImportFromClipboard, CanImportFromClipboard)))); TaskAreas.Add(new TaskAreaItemsViewModel("Other tasks", new TaskAreaCommandViewModel("Export word lists", new RelayCommand(Export, CanExport)), new TaskAreaCommandViewModel("Remove affixes from words in all varieties", new RelayCommand(RunStemmer, CanRunStemmer)))); AddNewVarietyCommand = new RelayCommand(AddNewVariety); AddNewMeaningCommand = new RelayCommand(AddNewMeaning); ImportWordListsCommand = new RelayCommand(ImportFromFile); ShowGettingStartedCommand = new RelayCommand(ShowGettingStarted); _isEmpty = true; }
public JobController(UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, RoleManager <IdentityRole> roleManager, IEmailService emailService, IBusinessStreamRepository businessRepository, IJobRepository jobsRepository, IClientRepository clientRepository, IPostalCodeRepository postalCodeRepository, IProvinceRepository provinceRepository, IJobApplyRepository jobApplyRepository, IJobSeekerRepository jobseekerRepository, IJobCategoryRepository jobCategoryRepository, IAutoFillService autoFillService, IImportService importService) { _userManager = userManager; _signInManager = signInManager; _roleManager = roleManager; _emailService = emailService; _businessRepository = businessRepository; _jobsRepository = jobsRepository; _clientRepository = clientRepository; _postalCodeRepository = postalCodeRepository; _provinceRepository = provinceRepository; _jobApplyRepository = jobApplyRepository; _jobseekerRepository = jobseekerRepository; _jobCategoryRepository = jobCategoryRepository; _autoFillService = autoFillService; _importService = importService; }
public WordListsViewModel(IProjectService projectService, IDialogService dialogService, IImportService importService, IExportService exportService, IAnalysisService analysisService, WordListsVarietyViewModel.Factory varietyFactory) : base("Word lists") { _projectService = projectService; _dialogService = dialogService; _importService = importService; _exportService = exportService; _analysisService = analysisService; _varietyFactory = varietyFactory; Messenger.Default.Register <SwitchViewMessage>(this, HandleSwitchView); _projectService.ProjectOpened += _projectService_ProjectOpened; _findCommand = new RelayCommand(Find); TaskAreas.Add(new TaskAreaItemsViewModel("Common tasks", new TaskAreaCommandViewModel("Add a new variety", new RelayCommand(AddNewVariety)), new TaskAreaCommandViewModel("Add a new meaning", new RelayCommand(AddNewMeaning)), new TaskAreaCommandViewModel("Find words", _findCommand), new TaskAreaCommandViewModel("Import word lists", new RelayCommand(Import)))); TaskAreas.Add(new TaskAreaItemsViewModel("Other tasks", new TaskAreaCommandViewModel("Export word lists", new RelayCommand(Export)), new TaskAreaCommandViewModel("Remove affixes from all words", new RelayCommand(RunStemmer)))); _isEmpty = true; }
public AdminController(IDataService db, IImportService feed, IStorageService ss, UserManager <AppUser> um) { _db = db; _feed = feed; _um = um; _ss = ss; }
public ClientController(IImportService importService, UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, RoleManager <IdentityRole> roleManager, IClientRepository clientRepository, IEmailService emailService, IBusinessStreamRepository businessRepository, IProvinceRepository provinceRepository, //IEmailSender emailSender IPostalCodeRepository postalCodeRepository, IJobRepository jobsRepository, IJobCategoryRepository jobCategoryRepository, IHostingEnvironment hostingEnvironment, IRepository <CompanyImage> companyImage, IRepository <CompanyUser> companyUsersRepository, IAutoFillService autoFillService ) { _importService = importService; _jobsRepository = jobsRepository; _userManager = userManager; _signInManager = signInManager; _roleManager = roleManager; _clientRepository = clientRepository; _emailService = emailService; _businessRepository = businessRepository; _jobCategoryRepository = jobCategoryRepository; _hostingEnvironment = hostingEnvironment; _companyImage = companyImage; _companyUsersRepository = companyUsersRepository; _autoFillService = autoFillService; _provinceRepository = provinceRepository; _postalCodeRepository = postalCodeRepository; }
public DataImporter(IImportService importService, IImportIdentifierMappingService mapper, IOptions <ImportOptions> importOptions, ILogger <DataImporter> log) { this.importService = importService; this.mapper = mapper; this.importOptions = importOptions.Value; this.log = log; }
private ReleaseDataFileService SetupReleaseDataFileService( ContentDbContext contentDbContext = null, StatisticsDbContext statisticsDbContext = null, IPersistenceHelper <ContentDbContext> contentPersistenceHelper = null, IBlobStorageService blobStorageService = null, IDataArchiveValidationService dataArchiveValidationService = null, IFileUploadsValidatorService fileUploadsValidatorService = null, IFileRepository fileRepository = null, IReleaseFileRepository releaseFileRepository = null, IImportService importService = null, IImportStatusService importStatusService = null, IUserService userService = null) { return(new ReleaseDataFileService( contentDbContext ?? new Mock <ContentDbContext>().Object, statisticsDbContext ?? new Mock <StatisticsDbContext>().Object, contentPersistenceHelper ?? DefaultPersistenceHelperMock().Object, blobStorageService ?? new Mock <IBlobStorageService>().Object, dataArchiveValidationService ?? new Mock <IDataArchiveValidationService>().Object, fileUploadsValidatorService ?? new Mock <IFileUploadsValidatorService>().Object, fileRepository ?? new FileRepository(contentDbContext), releaseFileRepository ?? new ReleaseFileRepository(contentDbContext), importService ?? new Mock <IImportService>().Object, importStatusService ?? new Mock <IImportStatusService>().Object, userService ?? new Mock <IUserService>().Object )); }
public GeographicalViewModel(IProjectService projectService, IDialogService dialogService, IImportService importService, IImageExportService imageExportService, GeographicalVarietyViewModel.Factory varietyFactory) : base("Geographical") { _projectService = projectService; _dialogService = dialogService; _importService = importService; _imageExportService = imageExportService; _varietyFactory = varietyFactory; _newRegionCommand = new RelayCommand<IEnumerable<Tuple<double, double>>>(AddNewRegion); _currentClusters = new List<Cluster<Variety>>(); _projectService.ProjectOpened += _projectService_ProjectOpened; Messenger.Default.Register<ComparisonPerformedMessage>(this, msg => ClusterVarieties()); Messenger.Default.Register<DomainModelChangedMessage>(this, msg => { if (msg.AffectsComparison) ResetClusters(); if (_selectedRegion != null && (!_varieties.Contains(_selectedRegion.Variety) || !_selectedRegion.Variety.Regions.Contains(_selectedRegion))) SelectedRegion = null; }); Messenger.Default.Register<PerformingComparisonMessage>(this, msg => ResetClusters()); _similarityScoreThreshold = 0.7; TaskAreas.Add(new TaskAreaCommandGroupViewModel("Similarity metric", new TaskAreaCommandViewModel("Lexical", new RelayCommand(() => SimilarityMetric = SimilarityMetric.Lexical)), new TaskAreaCommandViewModel("Phonetic", new RelayCommand(() => SimilarityMetric = SimilarityMetric.Phonetic)))); TaskAreas.Add(new TaskAreaItemsViewModel("Other tasks", new TaskAreaCommandViewModel("Import regions", new RelayCommand(ImportRegions)), new TaskAreaCommandViewModel("Export this map", new RelayCommand(Export)))); }
public CommandHandlerTests() { _aggregationService = A.Fake <IAggregationService>(); _downloadService = A.Fake <IDownloadService>(); _importService = A.Fake <IImportService>(); _commandHandler = new CommandHandler(_aggregationService, _downloadService, _importService); }
public WordListsViewModel(IProjectService projectService, IDialogService dialogService, IImportService importService, IExportService exportService, IAnalysisService analysisService, WordListsVarietyViewModel.Factory varietyFactory) : base("Word lists") { _projectService = projectService; _dialogService = dialogService; _importService = importService; _exportService = exportService; _analysisService = analysisService; _varietyFactory = varietyFactory; Messenger.Default.Register<SwitchViewMessage>(this, HandleSwitchView); Messenger.Default.Register<DomainModelChangedMessage>(this, HandleDomainModelChanged); _projectService.ProjectOpened += _projectService_ProjectOpened; _findCommand = new RelayCommand(Find); TaskAreas.Add(new TaskAreaItemsViewModel("Common tasks", new TaskAreaCommandViewModel("Add a new variety", new RelayCommand(AddNewVariety)), new TaskAreaCommandViewModel("Add a new meaning", new RelayCommand(AddNewMeaning)), new TaskAreaCommandViewModel("Find words", _findCommand), new TaskAreaCommandViewModel("Import word lists", new RelayCommand(Import)))); TaskAreas.Add(new TaskAreaItemsViewModel("Other tasks", new TaskAreaCommandViewModel("Export word lists", new RelayCommand(Export, CanExport)), new TaskAreaCommandViewModel("Remove affixes from words in all varieties", new RelayCommand(RunStemmer, CanRunStemmer)))); _addNewVarietyCommand = new RelayCommand(AddNewVariety); _addNewMeaningCommand = new RelayCommand(AddNewMeaning); _importWordListsCommand = new RelayCommand(Import); _showGettingStartedCommand = new RelayCommand(ShowGettingStarted); _isEmpty = true; }
public ImportViewModel(IImportService import) { _import = import; ClearCommand = new RelayCommand(() => Ids.Clear(), () => Ids.Count > 0); ImportCommand = new AsyncCommand(async() => { await Task.Run(() => _import.ImportAsync(Ids.ToList(), SelectedGroup, Rcf ? ProfileType.Rcf : ProfileType.Fide)); //await _import.ImportAsync(Ids.ToList(), SelectedGroup, Rcf ? ProfileType.Rcf : ProfileType.Fide) //.ConfigureAwait(false); MessengerInstance.Send(Ri2Constants.Notifications.DbUpdated); MessengerInstance.Send(Ri2Constants.Notifications.ProfilesUpdated); }); AddIdCommand = new RelayCommand(() => { if (CurrentId != 0) { Ids.Add(CurrentId); } CurrentId = 0; }); SelectFileCommand = new RelayCommand(SelectFile); DeleteIdCommand = new RelayCommand <int>(i => Ids.Remove(i), Ids.Count > 0); MessengerInstance.Register <string>(this, msg => { if (msg == Ri2Constants.Notifications.GroupsUpdated) { RaisePropertyChanged(nameof(Groups)); } }); }
public Reconciler( ISapphireRepository sapphireRepository, ICompanyRepository companyRepository, IPurchaseOrderHeaderRepository purchaseOrderHeaderRepository, IQueueRepository queueRepository, IServiceLog serviceLog, IConsoleLogger consoleLogger, IImportService importService, IExportService exportService, IJobCostActivityService jobCostActivityService, IJobService jobService, IVariancePurchaseOrderService variancePurchaseOrderService) { _sapphireRepository = sapphireRepository; _companyRepository = companyRepository; _purchaseOrderHeaderRepository = purchaseOrderHeaderRepository; _queueRepository = queueRepository; _serviceLog = serviceLog; _consoleLogger = consoleLogger; _importService = importService; _exportService = exportService; _jobCostActivityService = jobCostActivityService; _jobService = jobService; _variancePurchaseOrderService = variancePurchaseOrderService; }
public AdminController(IDataService db, IImportService feed, IStorageService ss, UserManager <AppUser> um, IAppService <AppItem> app) { _db = db; _feed = feed; _um = um; _ss = ss; _app = app; }
public AdminController(IOrchardServices services, IImportService importService, IBlogService blogService, IEnumerable<IBlogAssembler> assemblers) { Services = services; _importService = importService; _blogService = blogService; _assemblers = assemblers; T = NullLocalizer.Instance; }
public IndexModel(IConfiguration config, ILookup lookup, IImportService importService, IExportService exportService) { _config = config; _lookup = lookup; _importService = importService; _exportService = exportService; Accounts = new List <Person>(); }
public WcfService(IDataService dataService, IImportService importService) { Contract.Requires<ArgumentNullException>(dataService != null, "dataService"); Contract.Requires<ArgumentNullException>(importService != null, "importService"); _dataService = dataService; _importService = importService; }
public Service(IAdvancedBus bus, Settings settings, ISubscriptionService subscriptionService, ICheckSubscriptionService checkSubscriptionService, IImportService importService) { _bus = bus; _settings = settings; _subscriptionService = subscriptionService; _checkSubscriptionService = checkSubscriptionService; _importService = importService; }
public ImportController( IImportService importService, IEnumerable <IBankFileImporter> bankFileImporters, IBankAccountService bankAccountService) { _importService = importService; _bankFileImporters = bankFileImporters; _bankAccountService = bankAccountService; }
public ProductsController( IProductRepository productRepository, IProviderRepository providerRepository, IImportService importService) { _productRepository = productRepository; _providerRepository = providerRepository; _importService = importService; }
public DocumentManagementService(List <MetadataItem> documentList, IMessageBoxService messageBoxService, IImportService importService, IExportService exportService, IFileService fileService, ISearchService searchService) { _documentList = documentList; _messageBoxService = messageBoxService; _importService = importService; _exportService = exportService; _fileService = fileService; _searchService = searchService; }
public ConsoleApp( IOptions <Config> appSettings, IImportService import, ICreateTable createTable) { _createTable = createTable; _import = import; _appSettings = appSettings?.Value ?? throw new ArgumentNullException(nameof(appSettings)); }
public HtmlLoadService(IImportService <List <PaymentDocumentImport> > importService, IAccountService accountService, IPaymentDocumentService documentService, IConfiguration <HtmlConfiguration> configuration, IBrokenRecordsReport report) { _importService = importService; _accountService = accountService; _documentService = documentService; _configuration = configuration; _report = report; }
public AdminController(IOrchardServices services, IImportService importService, IBlogService blogService, IEnumerable <IBlogAssembler> assemblers) { Services = services; _importService = importService; _blogService = blogService; _assemblers = assemblers; T = NullLocalizer.Instance; }
public ImportJobMappingStepViewModel(IRepositoryFactory<IImportRepository> repositoryFactory, IRepositoryFactory<ICatalogRepository> catalogRepositoryFactory, ImportJob item, WizardViewModelBare parentVM, IImportJobEntityFactory importFactory, IViewModelsFactory<IPickAssetViewModel> assetVmFactory, IViewModelsFactory<IColumnMappingViewModel> mappingVmFactory, IImportService importService, ImportEntityType[] entityImporters, IAuthenticationContext authContext) : base(repositoryFactory, catalogRepositoryFactory, importFactory, item, parentVM, assetVmFactory, mappingVmFactory, importService, entityImporters, authContext) { }
public SegmentMappingsViewModel(IDialogService dialogService, IImportService importService, SegmentMappingViewModel.Factory mappingFactory, NewSegmentMappingViewModel.Factory newMappingFactory) { _dialogService = dialogService; _importService = importService; _mappingFactory = mappingFactory; _newMappingFactory = newMappingFactory; _mappings = new BindableList<SegmentMappingViewModel>(); _newCommand = new RelayCommand(AddMapping); _removeCommand = new RelayCommand(RemoveMapping, CanRemoveMapping); _importCommand = new RelayCommand(Import); _mappings.CollectionChanged += MappingsChanged; }
public PricelistImportJobHomeViewModel( IRepositoryFactory<IImportRepository> importRepository, IViewModelsFactory<ICreateImportJobViewModel> wizardVmFactory, IViewModelsFactory<IImportJobRunViewModel> runVmFactory, IViewModelsFactory<IImportJobViewModel> itemVmFactory, IImportJobEntityFactory entityFactory, IAuthenticationContext authContext, IImportService importService, SubTabsDefaultViewModel parentViewModel) :base(importRepository, wizardVmFactory, runVmFactory, itemVmFactory, entityFactory, authContext, importService, parentViewModel) { AvailableImporters = new[] { ImportEntityType.Price }; DefaultImporter = AvailableImporters.First().ToString(); }
public MainWindowViewModel(IProjectService projectService, IDialogService dialogService, IImportService importService, IExportService exportService, IImageExportService imageExportService, IAnalysisService analysisService, InputViewModel input, CompareViewModel compare, AnalyzeViewModel analyze) : base("Cog", input, compare, analyze) { _dialogService = dialogService; _importService = importService; _exportService = exportService; _imageExportService = imageExportService; _projectService = projectService; _analysisService = analysisService; _newCommand = new RelayCommand(New); _openCommand = new RelayCommand(Open); _saveCommand = new RelayCommand(Save, CanSave); _saveAsCommand = new RelayCommand(SaveAs); _importWordListsCommand = new RelayCommand(ImportWordLists); _importGeographicRegionsCommand = new RelayCommand(ImportGeographicRegions); _exportWordListsCommand = new RelayCommand(ExportWordLists, CanExportWordLists); _exportSimilarityMatrixCommand = new RelayCommand(ExportSimilarityMatrix, CanExportSimilarityMatrix); _exportCognateSetsCommand = new RelayCommand(ExportCognateSets, CanExportCognateSets); _exportSegmentFrequenciesCommand = new RelayCommand(ExportSegmentFrequencies, CanExportSegmentFrequencies); _exportHierarchicalGraphCommand = new RelayCommand(ExportHierarchicalGraph, CanExportHierarchicalGraph); _exportNetworkGraphCommand = new RelayCommand(ExportNetworkGraph, CanExportNetworkGraph); _exportGlobalCorrespondencesChartCommand = new RelayCommand(ExportGlobalCorrespondencesChart, CanExportGlobalCorrespondencesChart); _performComparisonCommand = new RelayCommand(PerformComparison, CanPerformComparison); _runStemmerCommand = new RelayCommand(RunStemmer, CanRunStemmer); _aboutCommand = new RelayCommand(ShowAbout); _showTutorialCommand = new RelayCommand(() => Process.Start("https://github.com/sillsdev/cog/wiki/Cog-Tutorial")); _showGettingStartedCommand = new RelayCommand(ShowGettingStarted); foreach (ContainerViewModelBase childView in Views.OfType<ContainerViewModelBase>()) childView.PropertyChanging += childView_PropertyChanging; PropertyChanging += OnPropertyChanging; _nullCommand = new RelayCommand(() => {}, () => false); _findCommand = _nullCommand; Messenger.Default.Register<SwitchViewMessage>(this, HandleSwitchView); Messenger.Default.Register<HookFindMessage>(this, msg => FindCommand = msg.FindCommand ?? _nullCommand); }
public ProfileController(IAgencyService agencyService, IImportService importService, ICanSave saver) { this.agencyService = agencyService; this.importService = importService; this.saver = saver; }
public void SourceDoesNotLoad_ReturnsFalse() { // Arrange _mockDataSourceRepository.Setup(s => s.IsValidDataSource(It.IsAny<int>())).Returns(true); // Valid Datasource Id _mockDatasource.Setup(d => d.LoadSource(It.IsAny<string>())).Returns(false); // Source loades OK _importService = new SnhImportService(_mockRepository.Object, _mockDataSourceRepository.Object, _mockDatasource.Object, _mockAlgorithm.Object, _mockMapper.Object); // Act var result = _importService.ImportData(1, "source"); // Assert Assert.IsFalse(result, "Expected the import routine to return FALSE."); }
public void SourceLoads_NoAggregates_ReturnsTrue() { // Arrange _mockDataSourceRepository.Setup(s => s.IsValidDataSource(It.IsAny<int>())).Returns(true); // Valid Datasource Id _mockDatasource.Setup(d => d.LoadSource(It.IsAny<string>())).Returns(true); // Source loads OK _mockDatasource.Setup(d => d.GetAll()).Returns(_importAggregates); // Import Aggreates _mockRepository.Setup(r => r.GetAllSortedByName()).Returns(new Collection<Aggregate>()); // Aggregates _mockAlgorithm.Setup(a => a.Match(It.IsAny<string>(), It.IsAny<IList<Aggregate>>())).Returns(1);// algorithm returns a match _mockMapper.Setup(m => m.Map(It.IsAny<ImportAggregate>())).Returns(_aggregateAchany); // mapper class returns valid aggregate _mockRepository.Setup((r => r.Update(It.IsAny<Aggregate>()))); // update database _mockRepository.Setup(r => r.Add(It.IsAny<Aggregate>())).Returns(1); // Add Aggregate to database returns id,successful _importService = new SnhImportService(_mockRepository.Object, _mockDataSourceRepository.Object, _mockDatasource.Object, _mockAlgorithm.Object, _mockMapper.Object); // Act var result = _importService.ImportData(1, "source"); // Assert Assert.IsTrue(result, "Expected the import routine to return True."); }
public void Initialise() { _mockRepository = new Mock<IAggregateRepository>(); _mockDataSourceRepository = new Mock<IDataSourceRepository>(); _mockDatasource = new Mock<ISnhDataSource>(); _mockAlgorithm = new Mock<IMatchingAlgorithm>(); _mockMapper = new Mock<IMapper<ImportAggregate, Aggregate>>(); _importService = null; _importAggregates = new List<ImportAggregate>() { new ImportAggregate() { Identifier = "Achany Estate", ImportDate = _timestamp, SourceId = 1, Data = new List<ImportData>() { new ImportData() { Data = "{achany estate}", DataType = DataTypeEnum.FootPrint } } }, new ImportAggregate() { Identifier = "Achlachan", ImportDate = _timestamp, SourceId = 1, Data = new List<ImportData>() { new ImportData() { Data = "{achlachan}", DataType = DataTypeEnum.FootPrint } } } }; _aggregateAchany = new Aggregate() { Id = 1, Name = "Achany Estate", Data = new Collection<AggregateData>() { new AggregateData() { Id = 1, Name = "Achany Estate", AggregateId = 1, DataSourceId = 1, Data = "{achany estate}", DataType = DataTypeEnum.FootPrint, LastUpdated = _timestamp } } }; _aggregates = new List<Aggregate>() { _aggregateAchany }; }
public ImportCommands(IImportService importService) { _importService = importService; }
/// <summary> /// Initializes a new instance of the <see cref="MainForm"/> class. /// </summary> public MainForm() { this.InitializeComponent(); this.importService = new ImportService(AlbumeSettingsService.Current, new FileSystemService(), new LogService(), new DateTimeService()); this.Init(string.Empty); }