예제 #1
0
 public TestCaseRepositoryTest_Create()
 {
     this.createdDirectory     = new Directory();
     this.fileSystemRepository = Mock.Of <IFileSystemRepository>(
         r => r.CreateDirectory(It.IsAny <string>()) == createdDirectory);
     this.testCaseRepository = new TestCaseRepository("Root", fileSystemRepository);
 }
 public NhsDataUpdater(IArchiveDownloadService archiveDownloadService, ReferenceDataApiConfiguration configuration, INhsCsvReaderHelper nhsCsvReaderHelper, IFileSystemRepository fileSystemRepository)
 {
     _archiveDownloadService = archiveDownloadService;
     _configuration          = configuration;
     _nhsCsvReaderHelper     = nhsCsvReaderHelper;
     _fileSystemRepository   = fileSystemRepository;
 }
 public MainOrchestrator(
     IGitlabService gitlabService,
     IFileSystemRepository fileSystemRepository)
 {
     _gitlabService        = gitlabService;
     _fileSystemRepository = fileSystemRepository;
 }
예제 #4
0
 public TestCaseRepositoryTest_AddExecution()
 {
     this.createdFile          = new File();
     this.fileSystemRepository = Mock.Of <IFileSystemRepository>(
         r => r.CreateFile(It.IsAny <string>(), It.IsAny <string>()) == this.createdFile);
     this.testCaseRepository = new TestCaseRepository("Root", fileSystemRepository);
 }
예제 #5
0
        public ImageService(IWebHostEnvironment hostingEnvironment, IFileSystemRepository fileSystemRepository)
        {
            _hostingEnvironment   = hostingEnvironment;
            _fileSystemRepository = fileSystemRepository;

            _rootPath = Path.Combine(_hostingEnvironment.WebRootPath, Constants.FILES_PATH);
        }
예제 #6
0
        public FileSystemService(IFileSystemRepository <FileSystem> fileSyatemRepository, ITagRepository <Tag> tagRepository, IStorageRepository storageRepository)
        {
            _fileSystemRepository = fileSyatemRepository;
            _tagRepository        = tagRepository;

            _storageRepository = storageRepository;
        }
 public CommandExecutionModel(IFileSystemRepository fileSystemRepository, Func <Guid> getSourceKey, Func <string, Task> addCommandToHistory, Func <Task <EnvironmentalConfig> > getEnvironmentalConfig, Func <Task> saveTextEditorContent)
 {
     FileSystemRepository        = fileSystemRepository ?? throw new ArgumentNullException(nameof(fileSystemRepository));
     FileSystemProviderConnector = new FileSystemProviderConnector(fileSystemRepository);
     GetSourceKey           = getSourceKey ?? throw new ArgumentNullException(nameof(getSourceKey));
     AddCommandToHistory    = addCommandToHistory ?? throw new ArgumentNullException(nameof(addCommandToHistory));
     GetEnvironmentalConfig = getEnvironmentalConfig ?? throw new ArgumentNullException(nameof(getEnvironmentalConfig));
     SaveTextEditorContent  = saveTextEditorContent ?? throw new ArgumentNullException(nameof(saveTextEditorContent));
 }
예제 #8
0
 public AudioService(
     IRepository <Audio> repository,
     IRepository <Speech> speechRepository,
     IFileSystemRepository fileSystemRepository)
     : base(repository)
 {
     _speechRepository     = speechRepository;
     _fileSystemRepository = fileSystemRepository;
 }
        internal JsonFileSystemDataProvider(IIDTable idTable, IFileSystemRepository repository, string idTablePrefix)
        {
            Assert.ArgumentNotNull(idTable, "idTable");
            Assert.ArgumentNotNull(repository, "repository");
            Assert.ArgumentNotNullOrEmpty(idTablePrefix, "idTablePrefix");

            _idtable       = idTable;
            _repository    = repository;
            _idTablePrefix = idTablePrefix;
        }
예제 #10
0
 public MainFormViewModel(IFileSystemRepository fileSystemRepository, IDialogService dialogService, IMailSender mailSender)
 {
     _fileSystemRepository         = fileSystemRepository;
     _dialogService                = dialogService;
     _mailSender                   = mailSender;
     Recipients.CollectionChanged += (o, args) =>
     {
         SaveRecipientsCommand.RaiseCanExecuteChanged();
         RaisePropertyChanged(() => MailsTotal);
         SendCommand.RaiseCanExecuteChanged();
     };
 }
예제 #11
0
        public BaseService(
            IFileSystemRepository fileSystemRepository,
            IMemoryCache memoryCache,
            IWebHostEnvironment hostingEnvironment,
            IOptions <AppSettings> appSettings)
        {
            //если каталоги обновляются редко, можно подключить кэш в appSettings.json -> UseCache = true
            _cache = memoryCache;
            _fileSystemRepository = fileSystemRepository;
            _hostingEnvironment   = hostingEnvironment;
            _appSettings          = appSettings.Value;


            _rootPath = Path.Combine(_hostingEnvironment.WebRootPath, Constants.FILES_PATH);
        }
예제 #12
0
        public frmOrder(ISettings settings, ILogger logger, IQBRepository repo, IFileSystemRepository fsRepo)
        {
            InitializeComponent();

            _settings = settings;
            _logger = logger;
            _repo = repo;
            _fsRepo = fsRepo;

            ucCC1.SetCardType(Enums.CreditCardType.Visa);
            ucCC2.SetCardType(Enums.CreditCardType.Visa);
            ucCC3.SetCardType(Enums.CreditCardType.Visa);
            rbCC.Checked = true;

            SetConnectionBasedUi();
        }
예제 #13
0
        public ExpansionPlanner()
        {
            InitializeComponent();

            eliteBgsRepository   = new EliteBgsRepository();
            eddbRepository       = new EddbRepository();
            solarSystemsService  = new SolarSystemsService(eliteBgsRepository, eddbRepository);
            fileSystemRepository = new FileSystemRepository();
            tickService          = new TickService(eliteBgsRepository);
            userSettingsService  = new UserSettingsService(fileSystemRepository);

            GetSettings();
            if (!string.IsNullOrEmpty(SystemNameTextBox.Text))
            {
                expansionReport.ExpandFromSystem = SystemNameTextBox.Text;
                GetExpansionReport();
            }
        }
예제 #14
0
        public Settings()
        {
            InitializeComponent();

            fileSystemRepository = new FileSystemRepository();
            userSettingsService  = new UserSettingsService(fileSystemRepository);

            var settings = userSettingsService.Load().Result;

            FactionName.Text             = settings.FactionName;
            OffLimits.Text               = string.Join(",", settings.OffLimits);
            NonNativeConflicts.IsChecked = settings.ShowNonNativeConflictReports;

            Properties.Settings.Default.Faction   = FactionName.Text;
            Properties.Settings.Default.OffLimits = OffLimits.Text;
            Properties.Settings.Default.ShowNonNativeConflictReports = (bool)NonNativeConflicts.IsChecked;
            Properties.Settings.Default.Save();
        }
예제 #15
0
        public SampleManager(HttpClient httpClient, IFileSystemRepository fileSystemRepository, IFavoriteRepository favoriteRepository)
        {
            if (httpClient == null)
            {
                throw new ArgumentNullException(nameof(httpClient));
            }
            if (fileSystemRepository == null)
            {
                throw new ArgumentNullException(nameof(fileSystemRepository));
            }
            if (favoriteRepository == null)
            {
                throw new ArgumentNullException(nameof(favoriteRepository));
            }

            FileSystemRepository = fileSystemRepository;
            FavoriteRepository   = favoriteRepository;
            HttpClient           = httpClient;
        }
예제 #16
0
        public MainWindow()
        {
            InitializeComponent();

            eliteBgsRepository      = new EliteBgsRepository();
            eddnRepository          = new EddnRepository();
            eddbRepository          = new EddbRepository();
            assetsService           = new AssetsService(eliteBgsRepository);
            factionsService         = new FactionsService(eliteBgsRepository);
            solarSystemsService     = new SolarSystemsService(eliteBgsRepository, eddbRepository);
            tickService             = new TickService(eliteBgsRepository);
            situationReportsService = new SituationReportsService(assetsService, factionsService, solarSystemsService, tickService);
            fileSystemRepository    = new FileSystemRepository();
            userSettingsService     = new UserSettingsService(fileSystemRepository);

            CheckForUpdates();
            GetSituations();
            //eddnRepository.ListenToEddn();
        }
예제 #17
0
        public frmMain(ILogger logger, QBRepository qbRepo, ISettings settings, frmCustomerSearch fCustSearch, IFileSystemRepository fsRepo, SalesItemsRepository salesItemsRepo)
        {
            InitializeComponent();

            try
            {
                _ucContacts = ucGridContacts;
                _ucSwatchOrders = ucSwatches;
                _ucPendingOrders = ucGridPendingOrders;

                _logger = logger;
                _qbRepo = qbRepo;
                _settings = settings;
                _fCustomerSearch = fCustSearch;
                _fsRepo = fsRepo;
                _salesItemsRepository = salesItemsRepo;

                _fCustomerSearch.Text = "QuickBooks Customers";

                if (_settings.IsInitialStartup)
                {
                    ShowSettingsForm();
                }

                LoadCboPendingSince();

                TestForQuickBooksConnection();

                SetConnectionBasedUiElements();

                CacheSalesItemsFromAppConfigFile();

            }
            catch (Exception ex)
            {
                _logger.LogException("There was an error in frmMain load.", ex);
                MessageBox.Show("There was an error on application startup (see the log for details).  The error may be related to incorrect settings.  The settings are located under View > Settings.", "Error",  MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #18
0
 public DefaultFileSystemService(IFileSystemRepository fileSystemRepository) =>
예제 #19
0
 public ImageService(IImageRepository imageRepository, IFileSystemRepository fileSystemRepository)
 {
     _imageRepository      = imageRepository;
     _fileSystemRepository = fileSystemRepository;
 }
 public void Initialize()
 {
     this.fileSystemRepository = Substitute.For <IFileSystemRepository>();
     this.fileSystemService    = new FileSystemService(fileSystemRepository);
 }
예제 #21
0
 public FileSystemService(IFileSystemRepository rep)
 {
     this._rep = rep;
 }
예제 #22
0
 public TestCaseRepository(string path, IFileSystemRepository fileSystemRepository)
 {
     this.path = path;
     this.fileSystemRepository = fileSystemRepository;
 }
예제 #23
0
 public MainFormViewModel(IFileSystemRepository fileSystemRepository, IDialogService dialogService, IMailSender mailSender)
 {
     _fileSystemRepository = fileSystemRepository;
     _dialogService = dialogService;
     _mailSender = mailSender;
     Recipients.CollectionChanged += (o, args) =>
     {
         SaveRecipientsCommand.RaiseCanExecuteChanged();
         RaisePropertyChanged(() => MailsTotal);
         SendCommand.RaiseCanExecuteChanged();
     };
 }
예제 #24
0
 public FileManagerController(FileExtensionContentTypeProvider contentTypeProvider, IFileSystemRepository repository)
 {
     ContentTypeProvider = contentTypeProvider;
     Repository          = repository;
 }
예제 #25
0
 public UserSettingsService(IFileSystemRepository fileSystemRepository)
 {
     _fileSystemRepository = fileSystemRepository;
 }
예제 #26
0
 public TestCaseRepositoryTest_Get()
 {
     this.directory            = new Directory();
     this.fileSystemRepository = Mock.Of <IFileSystemRepository>(r => r.GetDirectory(It.IsAny <string>()) == directory);
     this.testCaseRepository   = new TestCaseRepository("Root", fileSystemRepository);
 }
예제 #27
0
 public PgmSettingManagerService(IFileSystemRepository fileSystemRepository)
 {
     _fileSystemRepository = fileSystemRepository;
     SetCurrentSettings();
 }
예제 #28
0
 public HtmlParser(IFileSystemRepository fileSystemRepository)
 {
     this.fileSystemRepository = fileSystemRepository;
 }
예제 #29
0
 public PGMService(IGitlabService gitlabService, IFileSystemRepository fileSystemRepository)
 {
     //_gitlabService = gitlabService;
     _fileSystemRepository = fileSystemRepository;
 }
예제 #30
0
 public void Initialize()
 {
     fileSystemRepository = new FileSystemRepository();
     parsingService       = new WikiReferencesParsingService(fileSystemRepository);
 }
예제 #31
0
 public FileSystemService(IFileSystemRepository fileSystemRepository)
 {
     _fileSystemRepository = fileSystemRepository;
 }
 public FileSystemProviderConnector(IFileSystemRepository fileSystemRepository)
 {
     FileSystemRepository = fileSystemRepository ?? throw new ArgumentNullException(nameof(fileSystemRepository));
 }
예제 #33
0
 public TestCaseRepositoryTest_FetchAll()
 {
     this.directories          = new List <Directory>();
     this.fileSystemRepository = Mock.Of <IFileSystemRepository>(r => r.FetchAllDirectories(It.IsAny <string>()) == directories);
     this.testCaseRepository   = new TestCaseRepository(string.Empty, fileSystemRepository);
 }