Пример #1
0
 public FileReader(
     FileReaderOptions fileReaderOptions,
     ILineProcessorFactory lineProcessorFactory,
     ILogger <FileReader> logger)
 {
     _fileReaderOptions    = fileReaderOptions;
     _lineProcessorFactory = lineProcessorFactory;
     _logger = logger;
 }
Пример #2
0
 public static void AddFileReader(this IServiceCollection serviceCollection, FileReaderOptions fileReaderOptions)
 {
     serviceCollection.AddTransient <IInputHandler, FileReader>();
     serviceCollection.AddSingleton(fileReaderOptions);
     serviceCollection.AddTransient <ILineProcessorFactory, LineProcessorFactory>();
 }