Exemple #1
0
        static void ReadFile(string filePath)
        { 
            List<string> textInMemory = new List<string>();
            string path = filePath;
            if (string.IsNullOrEmpty(path))
                path = winDir + "\\system.ini";
 
        StreamReader reader = new StreamReader(path);
        try
         {
           do
           {
            textInMemory.Add(IFileReaderService.ReadLine();
            }
        while (reader.Peek() != -1);
        }
        catch
        {
        textInMemory.Add("File is empty");
        }
    finally
    {
    reader.Close();
    }
Display(textInMemory);
}
Exemple #2
0
 public EntityPostProcessingService(ILogger <EntityPostProcessingService> logger, IFileReaderService fileReader,
                                    IApplicationManager application, IPlayerService playerService)
 {
     _logger        = logger;
     _fileReader    = fileReader;
     _application   = application;
     _playerService = playerService;
 }
Exemple #3
0
 public FileValidationProvider(IFileCompressionService fileCompressionService,
                               IFileReaderService fileReaderService,
                               IStatsFileParserService statsFileParserService)
 {
     this.fileCompressionService = fileCompressionService;
     this.fileReaderService      = fileReaderService;
     this.statsFileParserService = statsFileParserService;
 }
 public UnitConversionService(IUnitService <ScalarFloat, float> unitService, IDataAccessService dataAccessService, IPrefixDefinitionRepository prefixDefinitionRepository, IUnitDefinitionRepository unitDefinitionRepository, IFileGeneratorService fileGeneratorService, IFileReaderService fileReaderService)
 {
     UnitService                = unitService;
     DataAccessService          = dataAccessService;
     PrefixDefinitionRepository = prefixDefinitionRepository;
     UnitDefinitionRepository   = unitDefinitionRepository;
     FileGeneratorService       = fileGeneratorService;
     FileReaderService          = fileReaderService;
 }
Exemple #5
0
 public WebAppService(IDataAccessService dataAccessService, IWebAppItemRepository webAppItemRepository, IWebAppConfigurationRepository webAppConfigurationRepository, ISystemWebAppService systemService, IFileGeneratorService fileGeneratorService, IFileReaderService fileReaderService, IHelperService helperService)
 {
     DataAccessService             = dataAccessService;
     WebAppItemRepository          = webAppItemRepository;
     WebAppConfigurationRepository = webAppConfigurationRepository;
     SystemService        = systemService;
     FileGeneratorService = fileGeneratorService;
     FileReaderService    = fileReaderService;
     HelperService        = helperService;
 }
Exemple #6
0
 public MunrosManager(
     IInvokeHandler <MunrosManager> invokeHandler,
     IMunrosRepository munrosRepository,
     IFileReaderService fileReaderService,
     IMunroService munroService)
 {
     _munrosRepository  = munrosRepository;
     _invokeHandler     = invokeHandler;
     _fileReaderService = fileReaderService;
     _munroService      = munroService;
 }
Exemple #7
0
 public void Dispose()
 {
     _folderParserService = null;
     _folderManager       = null;
     _calculationService  = null;
     _fileReaderService   = null;
     _dataProcessor       = null;
     _outputService       = null;
     _fileSystem          = null;
     _medianManager       = null;
     _configService       = null;
 }
        public void ServiceSetup()
        {
            _host.AddService(_activityDefinitionService);
            IJSRuntime jsRuntime = Substitute.For <IJSRuntime>();

            _host.AddService(jsRuntime);
            IFileReaderService fileReaderService = Substitute.For <IFileReaderService>();

            _host.AddService(fileReaderService);
            _localStorage = Substitute.For <ILocalStorageService>();
            _host.AddService(_localStorage);
        }
Exemple #9
0
 public PreProcessor(
     IVideoRepository videoRepository,
     string downloadedTorrentPath,
     IPreProcessorService preProcessorService,
     IFileReaderService fileReaderService
     )
 {
     _videoRepository       = videoRepository;
     _downloadedTorrentPath = downloadedTorrentPath;
     _preProcessorService   = preProcessorService;
     _fileReaderService     = fileReaderService;
 }
Exemple #10
0
 public AppLauncherTest()
 {
     _fileSystem          = new FileSystem();
     _folderParserService = new FolderParserService(_fileSystem);
     _folderManager       = new FolderManager(_folderParserService);
     _calculationService  = new CalculationService();
     _fileReaderService   = new FileReaderService(_fileSystem);
     _dataProcessor       = new DataProcessor(_calculationService, _fileReaderService);
     _outputService       = new ConsoleOutputService();
     _medianManager       = new MedianManager(_folderManager, _dataProcessor, _outputService);
     _configService       = new ConfigService(new ConfigurationBuilder()
                                              .SetBasePath(Directory.GetCurrentDirectory())
                                              .AddJsonFile("appsettings.json")
                                              .Build());
 }
 public DataProcessor(ICalculationService calcService, IFileReaderService fileReaderService)
 {
     _calcService       = calcService ?? throw new ArgumentNullException(nameof(calcService));
     _fileReaderService = fileReaderService ?? throw new ArgumentNullException(nameof(fileReaderService));
 }
Exemple #12
0
 public ApplicationDbContext(DbContextOptions <ApplicationDbContext> options, ILogger <ApplicationDbContext> logger, IFileReaderService fileReader) : base(options)
 {
     _logger     = logger;
     _fileReader = fileReader;
 }
 public GameService(IFileReaderService fileReader)
 {
     _fileReader = fileReader;
 }
Exemple #14
0
 public DatDbData()
 {
     _readerService = new FileReaderService();
 }
Exemple #15
0
 public ProjectReader(IFileReaderService fileReaderService, IProjectManager projectManager, IFileService fileService)
 {
     _fileReaderService = fileReaderService;
     _projectManager    = projectManager;
     _rawFileService    = fileService;
 }
Exemple #16
0
 public UploadService(IFileReaderService fileReaderService)
 {
     this.fileReaderService = fileReaderService;
 }
Exemple #17
0
 public TorrentsService(CustomHttpClient customHttpClient, IFileReaderService fileReaderService)
 {
     _customHttpClient  = customHttpClient;
     _fileReaderService = fileReaderService;
 }
Exemple #18
0
 public FileReaderServiceTests(IFileReaderService fileReaderService, IConfiguration configuration)
 {
     _fileReaderService = fileReaderService;
     _configuration     = configuration;
 }
 public BatReaderServiceTest()
 {
     _service = new FileReaderService();
 }
 public void Setup()
 {
     _fileReaderService = new FileReaderService();
 }
Exemple #21
0
 public FileDataService(ILogger <FileDataService> logger, IFileReaderService fileReaderService)
 {
     _logger            = logger;
     _fileReaderService = fileReaderService;
 }
 public ApplicationInfoService(IFileReaderService fileReaderService, string fileName)
 {
     _fileReaderService = fileReaderService.ThrowIfNull(nameof(fileReaderService));
     _fileName          = fileName.ThrowIfNullOrEmpty(nameof(fileName));
 }
 public ServiceOfImage(HttpClient Http, IFileReaderService fileReadService)
 {
     this.Http            = Http;
     this.fileReadService = fileReadService;
 }