Exemple #1
0
 public GeneratorService(IEProtecAPIService eProtecAPIService, ISettingsService settingsService, IExcelService excelService, IPdfService pdfService)
 {
     _eProtecAPIService = eProtecAPIService ?? throw new ArgumentNullException(nameof(eProtecAPIService));
     _settingsService   = settingsService ?? throw new ArgumentNullException(nameof(settingsService));
     _excelService      = excelService ?? throw new ArgumentNullException(nameof(excelService));
     _pdfService        = pdfService ?? throw new ArgumentNullException(nameof(pdfService));
 }
Exemple #2
0
        public MainForm(ISettingsService settingsService, IEProtecAPIService eProtecAPIService, IGeneratorService generatorService, IGenerationDataService generationDataService, IDietService dietService)
        {
            _settingsService       = settingsService ?? throw new ArgumentNullException(nameof(settingsService));
            _eProtecAPIService     = eProtecAPIService ?? throw new ArgumentNullException(nameof(eProtecAPIService));
            _generatorService      = generatorService ?? throw new ArgumentNullException(nameof(generatorService));
            _generationDataService = generationDataService ?? throw new ArgumentNullException(nameof(generationDataService));
            _dietService           = dietService ?? throw new ArgumentNullException(nameof(dietService));

            InitializeComponent();
            InitializeSettings();
            InitializeGenerationData();
            InitializeDietData();
        }
 public DietService(IEProtecAPIService eProtecAPIService, ISettingsService settingsService, IExcelService excelService)
 {
     _eProtecAPIService = eProtecAPIService ?? throw new ArgumentNullException(nameof(eProtecAPIService));
     _settingsService   = settingsService ?? throw new ArgumentNullException(nameof(settingsService));
     _excelService      = excelService ?? throw new ArgumentNullException(nameof(excelService));
 }