public RoleController(IErrorMessageService errorMessageService, ILoggerFactory loggerService, IRoleService roleService) { _errorMessageService = errorMessageService; _roleService = roleService; _loggerService = loggerService.CreateLogger <RoleController>(); }
public SecurityHelper(IErrorMessageService errorMessageService, ILoggerFactory loggerService, IOptions <JWTSettings> optionsAccessor) { _errorMessageService = errorMessageService; _loggerService = loggerService.CreateLogger <SecurityHelper>(); _options = optionsAccessor.Value; }
public EditPreferencesPresenter(IChildPresenter <IJiraLoginView, IJiraLoginParent> childPresenter, IPreferencesService preferences, IJiraService jira, IErrorMessageService errors) { _childPresenter = childPresenter; _preferences = preferences; _jira = jira; _errors = errors; }
private IStatsUploadDatabaseService NewStatsUploadDatabaseProvider( IStatsDownloadDatabaseService statsDownloadDatabaseService, IStatsDownloadDatabaseParameterService statsDownloadDatabaseParameterService, ILoggingService loggingService, IErrorMessageService errorMessageService) { return(new StatsUploadDatabaseProvider(statsDownloadDatabaseService, statsDownloadDatabaseParameterService, loggingService, errorMessageService)); }
public UserController(IErrorMessageService errorMessageService, ILoggerFactory loggerService, IUserService userService) { this.errorMessageService = errorMessageService; this.userService = userService; this.loggerService = loggerService.CreateLogger <UserController>(); }
public CoreRepository(IDataService dataService, IErrorTraceService errorTraceService, IErrorMessageService errorMessageService) { _dataService = dataService; _errorTraceService = errorTraceService; _errorMessageService = errorMessageService; IsLoadOption = OptionLoad(); DataList = new ObservableCollection <object>(); }
public StatsDownloadEmailProvider(IEmailService emailService, IErrorMessageService errorMessageService, IEmailSettingsService emailSettingsService) { this.emailService = emailService ?? throw new ArgumentNullException(nameof(emailService)); this.errorMessageService = errorMessageService ?? throw new ArgumentNullException(nameof(errorMessageService)); this.emailSettingsService = emailSettingsService ?? throw new ArgumentNullException(nameof(emailSettingsService)); }
public void SetUp() { _jiraService = Substitute.For <IJiraService>(); _errors = TestHelper.LogErrors(Substitute.For <IErrorMessageService>()); _view = Substitute.For <IJiraLoginView>(); _parent = Substitute.For <IJiraLoginParent>(); _presenter = new JiraLoginPresenter(_jiraService, _errors); }
public DeviceSimulationService(IOptions <DeviceSettings> deviceSettings, ITelemetryMessageService telemetryMessagingService, IErrorMessageService errorMessagingService, ICommissioningMessageService commissioningMessagingService, ILoggerFactory loggerFactory) { if (deviceSettings == null) { throw new ArgumentNullException(nameof(deviceSettings)); } if (deviceSettings.Value == null) { throw new ArgumentNullException("deviceSettings.Value", "No device configuration has been loaded."); } if (deviceSettings.Value.SimulationSettings == null) { throw new ArgumentNullException("deviceSettings.Value.SimulationSettings"); } if (telemetryMessagingService == null) { throw new ArgumentNullException(nameof(telemetryMessagingService)); } if (errorMessagingService == null) { throw new ArgumentNullException(nameof(errorMessagingService)); } if (commissioningMessagingService == null) { throw new ArgumentNullException(nameof(commissioningMessagingService)); } if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory), "No logger factory has been provided."); } _deviceSettings = deviceSettings.Value; _simulationSettings = deviceSettings.Value.SimulationSettings; _deviceId = _deviceSettings.DeviceId; _iotHub = _deviceSettings.HostName; _telemetryInterval = _simulationSettings.TelemetryFrecuency; _logger = loggerFactory.CreateLogger <DeviceSimulationService>(); _telemetryMessagingService = telemetryMessagingService; _errorMessagingService = errorMessagingService; _commissioningMessagingService = commissioningMessagingService; string logPrefix = "system".BuildLogPrefix(); _logger.LogDebug($"{logPrefix}::{_deviceSettings.ArtifactId}::Logger created."); _logger.LogDebug($"{logPrefix}::{_deviceSettings.ArtifactId}::Device simulator created."); }
public UserService(IUserRepository userRepository, IErrorMessageService errorMessageService, ISecurityHelper securityHelper, ILoggerFactory loggerService) { _userRepository = userRepository; _errorMessageService = errorMessageService; _securityHelper = securityHelper; _loggerService = loggerService.CreateLogger <UserService>(); }
public MenuService(IMenuRepository menuRepository, IErrorMessageService errorMessageService, ISecurityHelper securityHelper, ILoggerFactory loggerService) { _menuRepository = menuRepository; _errorMessageService = errorMessageService; _securityHelper = securityHelper; _loggerService = loggerService.CreateLogger <MenuService>(); }
public PermissionController(IErrorMessageService errorMessageService, ILoggerFactory loggerService, IPermissionService permissionService, IMenuService menuService) { _errorMessageService = errorMessageService; _permissionService = permissionService; _menuService = menuService; _loggerService = loggerService.CreateLogger <PermissionController>(); }
public PermissionService(IPermissionRepository permissionRepository, IErrorMessageService errorMessageService, ISecurityHelper securityHelper, ILoggerFactory loggerService) { _permissionRepository = permissionRepository; _errorMessageService = errorMessageService; _securityHelper = securityHelper; _loggerService = loggerService.CreateLogger <PermissionService>(); }
public static IErrorMessageService LogErrors(IErrorMessageService service) { service .When(e => e.ShowErrorMessage(Arg.Any <object>(), Arg.Any <string>(), Arg.Any <string>())) .Do(c => { Console.WriteLine("Error shown to user."); Console.WriteLine($"\tTitle = '{c[2]}'"); Console.WriteLine($"\tMessage = '{c[1]}'"); }); return(service); }
public void SetUp() { _view = Substitute.For <IEditPreferencesView>(); _childPresenter = Substitute.For <IChildPresenter <IJiraLoginView, IJiraLoginParent> >(); _childView = Substitute.For <IJiraLoginView>(); _preferences = Substitute.For <IPreferencesService>(); _jira = Substitute.For <IJiraService>(); _errors = TestHelper.LogErrors(Substitute.For <IErrorMessageService>()); _presenter = new EditPreferencesPresenter(_childPresenter, _preferences, _jira, _errors); _view.CreateJiraLoginView().Returns(_childView); }
public StatsUploadDatabaseProvider(IStatsDownloadDatabaseService statsDownloadDatabaseService, IStatsDownloadDatabaseParameterService statsDownloadDatabaseParameterService, ILoggingService loggingService, IErrorMessageService errorMessageService) { this.statsDownloadDatabaseService = statsDownloadDatabaseService ?? throw new ArgumentNullException( nameof(statsDownloadDatabaseService)); this.statsDownloadDatabaseParameterService = statsDownloadDatabaseParameterService ?? throw new ArgumentNullException( nameof(statsDownloadDatabaseParameterService)); this.loggingService = loggingService ?? throw new ArgumentNullException(nameof(loggingService)); this.errorMessageService = errorMessageService ?? throw new ArgumentNullException(nameof(errorMessageService)); }
public ModuleSimulationService(ModuleSettings settings, SimulationSettingsModule simulationSettings, ITelemetryMessageService telemetryMessagingService, IErrorMessageService errorMessagingService, ICommissioningMessageService commissioningMessagingService, ILoggerFactory loggerFactory) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } if (simulationSettings == null) { throw new ArgumentNullException(nameof(simulationSettings)); } if (telemetryMessagingService == null) { throw new ArgumentNullException(nameof(telemetryMessagingService)); } if (errorMessagingService == null) { throw new ArgumentNullException(nameof(errorMessagingService)); } if (commissioningMessagingService == null) { throw new ArgumentNullException(nameof(commissioningMessagingService)); } if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); } string logPrefix = "system".BuildLogPrefix(); ModuleSettings = settings; SimulationSettings = simulationSettings; _logger = loggerFactory.CreateLogger <ModuleSimulationService>(); _telemetryMessagingService = telemetryMessagingService; _errorMessagingService = errorMessagingService; _commissioningMessagingService = commissioningMessagingService; _telemetryInterval = 10; _stopProcessing = false; _moduleClient = ModuleClient.CreateFromConnectionString(ModuleSettings.ConnectionString, Microsoft.Azure.Devices.Client.TransportType.Mqtt); _logger.LogDebug($"{logPrefix}::{ModuleSettings.ArtifactId}::Logger created."); _logger.LogDebug($"{logPrefix}::{ModuleSettings.ArtifactId}::Module simulator created."); }
public HomeController(INotificationService notificationService, IConfiguration configuaration, IActionPlanService actionPlanService, ISettingService settingService, IMailHelper mailHelper, IDataService dataService, IErrorMessageService errorMessageService, IConfiguration configuration) { _notificationService = notificationService; _configuaration = configuaration; _actionPlanService = actionPlanService; _settingService = settingService; _mailHelper = mailHelper; _dataService = dataService; _errorMessageService = errorMessageService; _configuration = configuration; }
public StatsDownloadDatabaseParameterProvider(IErrorMessageService errorMessageService) { this.errorMessageService = errorMessageService ?? throw new ArgumentNullException(nameof(errorMessageService)); }
private IStatsDownloadEmailService NewStatsDownloadEmailProvider(IEmailService emailService, IErrorMessageService errorMessageService, IEmailSettingsService emailSettingsService) { return(new StatsDownloadEmailProvider(emailService, errorMessageService, emailSettingsService)); }
private IStatsDownloadDatabaseParameterService NewStatsDownloadDatabaseParameterProvider( IErrorMessageService errorMessageService) { return(new StatsDownloadDatabaseParameterProvider(errorMessageService)); }
public ModuleSimulationService( ModuleSettings settings, ITelemetryMessageService telemetryMessagingService, IErrorMessageService errorMessagingService, ICommissioningMessageService commissioningMessagingService, IProvisioningService provisioningService, ILoggerFactory loggerFactory) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } if (settings.SimulationSettings == null) { throw new ArgumentNullException("settings.SimulationSettings"); } if (telemetryMessagingService == null) { throw new ArgumentNullException(nameof(telemetryMessagingService)); } if (errorMessagingService == null) { throw new ArgumentNullException(nameof(errorMessagingService)); } if (commissioningMessagingService == null) { throw new ArgumentNullException(nameof(commissioningMessagingService)); } if (provisioningService == null) { throw new ArgumentNullException(nameof(provisioningService)); } if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); } string logPrefix = "system".BuildLogPrefix(); ModuleSettings = settings; SimulationSettings = settings.SimulationSettings; _logger = loggerFactory.CreateLogger <ModuleSimulationService>(); _telemetryMessagingService = telemetryMessagingService; _errorMessagingService = errorMessagingService; _commissioningMessagingService = commissioningMessagingService; _provisioningService = provisioningService; _telemetryInterval = 10; _stopProcessing = false; _environmentName = Environment.GetEnvironmentVariable("ENVIRONMENT"); _logger.LogDebug($"{logPrefix}::{ModuleSettings.ArtifactId}::Logger created."); _logger.LogDebug($"{logPrefix}::{ModuleSettings.ArtifactId}::Module simulator created."); }
public DeviceSimulationService( IOptionsMonitor <DeviceSettings> deviceSettingsDelegate, IOptions <DPSSettings> dpsSettings, ITelemetryMessageService telemetryMessagingService, IErrorMessageService errorMessagingService, ICommissioningMessageService commissioningMessagingService, IProvisioningService provisioningService, ILoggerFactory loggerFactory) { if (deviceSettingsDelegate == null) { throw new ArgumentNullException(nameof(deviceSettingsDelegate)); } if (deviceSettingsDelegate.CurrentValue == null) { throw new ArgumentNullException("deviceSettingsDelegate.CurrentValue"); } if (deviceSettingsDelegate.CurrentValue.SimulationSettings == null) { throw new ArgumentNullException("deviceSettingsDelegate.CurrentValue.SimulationSettings"); } if (dpsSettings == null) { throw new ArgumentNullException(nameof(dpsSettings)); } if (dpsSettings.Value == null) { throw new ArgumentNullException("dpsSettings.Value"); } if (telemetryMessagingService == null) { throw new ArgumentNullException(nameof(telemetryMessagingService)); } if (errorMessagingService == null) { throw new ArgumentNullException(nameof(errorMessagingService)); } if (commissioningMessagingService == null) { throw new ArgumentNullException(nameof(commissioningMessagingService)); } if (provisioningService == null) { throw new ArgumentNullException(nameof(provisioningService)); } if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory), "No logger factory has been provided."); } _deviceSettingsDelegate = deviceSettingsDelegate; _simulationSettings = _deviceSettingsDelegate.CurrentValue.SimulationSettings; _dpsSettings = dpsSettings.Value; //_deviceId = _deviceSettingsDelegate.CurrentValue.DeviceId; _iotHub = _deviceSettingsDelegate.CurrentValue.HostName; _telemetryInterval = _simulationSettings.TelemetryFrecuency; _logger = loggerFactory.CreateLogger <DeviceSimulationService>(); _telemetryMessagingService = telemetryMessagingService; _errorMessagingService = errorMessagingService; _commissioningMessagingService = commissioningMessagingService; _provisioningService = provisioningService; _environmentName = Environment.GetEnvironmentVariable("ENVIRONMENT"); string logPrefix = "system".BuildLogPrefix(); _logger.LogDebug($"{logPrefix}::{_deviceSettingsDelegate.CurrentValue.ArtifactId}::Logger created."); _logger.LogDebug($"{logPrefix}::{_deviceSettingsDelegate.CurrentValue.ArtifactId}::Device simulator created."); _logger.LogDebug($"{logPrefix}::{_deviceSettingsDelegate.CurrentValue.ArtifactId}::Enrollment type:{_dpsSettings.EnrollmentType.ToString()}."); _logger.LogDebug($"{logPrefix}::{_deviceSettingsDelegate.CurrentValue.ArtifactId}::Security type:{_dpsSettings.GroupEnrollment?.SecurityType.ToString()}."); }
public MailExtension(IConfiguration configuration, IErrorMessageService errorMessageService) { _configuration = configuration; _errorMessageService = errorMessageService; }
public MailHelper(IConfiguration configuration, IErrorMessageService errorMessageService) { _configuration = configuration; _errorMessageService = errorMessageService; }
public JiraLoginPresenter(IJiraService jiraService, IErrorMessageService errors) { _jiraService = jiraService; _errors = errors; }
public AccountController(IAuthManager authRepository, IUserAuthService userAuthService, IErrorMessageService errorMessageService) { _errorMessageService = errorMessageService; _userAuthService = userAuthService; _authManager = authRepository; }