public PayController(IPayComputationService payComputationService, IEmployeeService employeeService, ITaxService taxService, INicService nicService) { _payComputationService = payComputationService; _employeeService = employeeService; _taxService = taxService; _nicService = nicService; }
public TimeService(ILogger <TimeService> logger, NtpConfiguration ntpConfiguration, WindowConfiguration windowConfiguration, DateAndTimeFormat dateAndTimeFormat, ApplicationConfiguration applicationConfiguration, IStopwatchService stopwatchService, INicService nicService) { _logger = logger; _ntpConfiguration = ntpConfiguration; _windowConfiguration = windowConfiguration; _dateAndTimeFormat = dateAndTimeFormat; _applicationConfiguration = applicationConfiguration; _stopwatchService = stopwatchService; _nicService = nicService; }
public ApplicationService(ILogger <ApplicationService> logger, ITimeService timeService, IWindowService windowService, DateAndTimeFormat dateAndTimeFormat, WindowConfiguration windowConfiguration, ApplicationConfiguration applicationConfiguration, IStopwatchService stopwatchService, IHostApplicationLifetime hostApplicationLifetime, IStorageService storageService, INicService nicService, IInternetService internetService) { _logger = logger; _timeService = timeService; _windowService = windowService; _dateAndTimeFormat = dateAndTimeFormat; _windowConfiguration = windowConfiguration; _applicationConfiguration = applicationConfiguration; _stopwatchService = stopwatchService; _hostApplicationLifetime = hostApplicationLifetime; _storageService = storageService; _nicService = nicService; _internetService = internetService; _internetService.InternetConnectionAvailable += _internetService_InternetConnectionAvailable; _hostApplicationLifetime.ApplicationStopping.Register(() => { if (_applicationConfiguration.CountSystemRunningTime) { _stopwatchService.StopTimer(); } if (_applicationConfiguration.CountNetworkActivity) { _nicService.StopNicsMonitoring(); } _storageService.EditData(); _logger.LogDebug("Shutting down application"); _logger.LogDebug(new string('-', 100)); }); }