コード例 #1
0
 public CSVReadController(ICSVReader csvReader)
 {
     _csvReader = csvReader;
 }
コード例 #2
0
 public CSVTrainRepository(ICSVReader csvReader, IAgenciesRepository agenciesRepository, IConfiguration configuration)
 {
     _reader       = csvReader;
     _agenciesRepo = agenciesRepository;
     _config       = configuration;
 }
コード例 #3
0
 public HomeController(IOpenWeatherMapService openWeatherMapService, IWeatherInfoGenerator weatherInfoGenerator, ICSVReader cSVReader)
 {
     _openWeatherMapService = openWeatherMapService;
     _weatherInfoGenerator  = weatherInfoGenerator;
     _csvReader             = cSVReader;
 }
コード例 #4
0
        /*=================================================================================================
        *       PROPERTIES
        *================================================================================================*/
        /*PUBLIC******************************************************************************************/

        /*PRIVATE*****************************************************************************************/

        /*=================================================================================================
        *       CONSTRUCTORS
        *================================================================================================*/
        public CSVPasswordManager(ICSVReader reader, ICSVWriter writer)
        {
            _reader = reader;
            _writer = writer;
            _encryptedPasswordList = new List <DatabasePassword>();
        }
コード例 #5
0
 public UserSalesService(ICSVReader csvReader)
 {
     _csvReader = csvReader;
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSVReaderWriter"/> class.
 /// Using Unity or any other dependency injection container reader and writer will be passed.(DIP from SOLID principles)
 /// class depends only on the abstraction of reader and writer classes.
 /// This makes easier for testing as we can pass mocks of reader and writer.
 /// </summary>
 /// <param name="reader">The reader.</param>
 /// <param name="writer">The writer.</param>
 public CSVReaderWriter(ICSVReader reader, ICSVWriter writer)
 {
     this._reader = reader;
     this._writer = writer;
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSVReaderWriter"/> class.
 /// Adding this constructor for backward compatibility.
 /// </summary>
 public CSVReaderWriter()
 {
     this._reader = new CSVReader();
     this._writer = new CSVWriter();
 }
コード例 #8
0
ファイル: CSVReaderWriter.cs プロジェクト: shubhu1953/CSharp
 public CSVReaderWriter(ICSVReader csvReader, ICSVWriter csvWriter)
 {
     _csvReader = csvReader;
     _csvWriter = csvWriter;
 }
コード例 #9
0
 //Constructor Dependency Injection to instantiate CSVReader.
 public UploadController(ICSVReader _csvReader)
 {
     this.csvReader = _csvReader;
 }
コード例 #10
0
        public MainViewModel(IPLCMethods plcMethods, IPlcServices plcServices, ICSVWritter csvWritter, ICSVReader csvReader)
        {
            #region Commands
            _connectCommand = new RelayCommand(Connect);
            _viewCommand    = new RelayCommand(View);
            _viewFolder     = new RelayCommand(NewFolder);
            _webPage        = new RelayCommand(OpenWeb);
            _resetSaving    = new RelayCommand(Reset);


            #endregion

            #region Interfaces
            _plcMethods  = plcMethods;
            _plcServices = plcServices;
            _csvReader   = csvReader;
            _csvWritter  = csvWritter;
            #endregion

            #region ViewModels
            _messageViewModel = new MessageViewModel();
            #endregion

            #region Methods
            Fill();
            StartTimer();
            #endregion
        }