public SiteProvisioningJob() { this._configFactory = ConfigurationFactory.GetInstance(); this._appManager = _configFactory.GetAppSetingsManager(); this._settings = _appManager.GetAppSettings(); this._requestFactory = SiteRequestFactory.GetInstance(); this._siteTemplateFactory = SiteTemplateFactory.GetInstance(); }
public SodaService(IAppSettingsManager appSettingsManager, IEnumerable <IQueryBuilder> queryBuilders, SodaClient sodaClient, SoqlQuery soqlQuery) { _appSettingsManager = appSettingsManager; _queryBuilders = queryBuilders; _sodaClient = sodaClient; _soqlQuery = soqlQuery; }
public ControlViewModel(IOrientationService orientationService, INavigationService navigationService, IAppSettingsManager appSettingsManager, IUserDialogs userDialogs) : base(navigationService) { _orientationService = orientationService; _appSettingsManager = appSettingsManager; _userDialogs = userDialogs; LoadSites(); }
public UniversalParserController(IDownloadManager downloadManager, ICategoryManager categoryManager, IWebShopManager shopManager, IParserTaskManager parsertaskManager, IURLManager urlManager, IExecuteManager taskinfoManager, IPreviewManager previewManager, IAppSettingsManager appSettingsManager, IDeleteFilesManager deleteFilesManager) { this.downloadManager = downloadManager; this.categoryManager = categoryManager; this.shopManager = shopManager; this.parserTaskManager = parsertaskManager; this.urlManager = urlManager; this.previewManager = previewManager; this.taskinfoManager = taskinfoManager; this.appSettingsManager = appSettingsManager; this.deleteFilesManager = deleteFilesManager; }
public RegisterModel( UserManager <User> userManager, SignInManager <User> signInManager, ILogger <RegisterModel> logger, IEmailSender emailSender, IAppSettingsManager appSettingsManager) { _userManager = userManager; _signInManager = signInManager; _logger = logger; _emailSender = emailSender; _appSettingsManager = appSettingsManager; }
public SetupController(ILogger <SetupController> logger, IMailService mailService, UserManager <User> userManager, RoleManager <Role> roleManager, IAppSettingsManager appSettingsManager, ITriggerHistoryManager triggerHistoryManager, INotifierManager notifierManager) { _logger = logger; _mailService = mailService; _userManager = userManager; _roleManager = roleManager; _appSettingsManager = appSettingsManager; _triggerHistoryManager = triggerHistoryManager; _notifierManager = notifierManager; }
public AdminController(ILogger <AdminController> logger, UserManager <User> userManager, RoleManager <Role> roleManager, IAuthorizationService authorizationService, ILdapService ldapService, IAppSettingsManager appSettingsManager, INotificationRulesManager rulesManager) { _logger = logger; _userManager = userManager; _roleManager = roleManager; _authorizationService = authorizationService; _ldapService = ldapService; _appSettingsManager = appSettingsManager; _rulesManager = rulesManager; }
public HttpResponseMessage GetAppSettings() { try { IAppSettingsFactory _factory = AppSettingsFactory.GetInstance(); IAppSettingsManager _manager = _factory.GetManager(); var _appSettings = _manager.GetAppSettings(); return(Request.CreateResponse(HttpStatusCode.OK, _appSettings)); } catch (Exception _ex) { var _message = string.Format("There was an error processing the request. {0}", _ex.Message); Log.Error("AppSettingsController.GetAppSettings", "There was an error processing the request. Exception: {0}", _ex); HttpResponseMessage _response = Request.CreateResponse(HttpStatusCode.InternalServerError, _message); throw new HttpResponseException(_response); } }
/// <summary> /// Send the notifications for a rule /// </summary>z /// <param name="rule">Notification rule</param> /// <param name="call">Trigger call information</param> private async Task RunRuleAsync(NotificationRule rule, TriggerCall call) { // Validate notifiers prerequisite if (!rule.Notifiers.Any()) { _logger.LogError("This rule has no notifiers: {ruleName}", rule.DisplayName); return; } // Log rule using var _ = _logger.BeginScope("Sending notifications for rule: {ruleName}", rule.DisplayName); // Prepare the message texts var message = await Task.Run(() => PrepareMessage(rule, call)); if (string.IsNullOrWhiteSpace(message.Body)) { _logger.LogError("The message body is empty for rule: {ruleName}", rule.DisplayName); return; } _logger.LogDebug("The message is: {message}", message.ToString()); // Apply global template if (rule.UseGlobalMessageTemplate) { using var scope = _serviceProvider.CreateScope(); IAppSettingsManager appSettingsManager = scope.ServiceProvider.GetRequiredService <IAppSettingsManager>(); AppSettings appSettings = appSettingsManager.AppSettings; message.ApplyTemplate(appSettings.HtmlMessageTemplate, $"{appSettings.BaseUrl}/Rules"); } // Resolv groups and get all recipient users var recipients = await Task.Run(() => GetRecipientUsers(rule)); _logger.LogDebug("Recipients are: {recipients}", string.Join(", ", recipients.Select(u => u.UserName))); // send message through each notifier rule.Notifiers .Select(notifier => notifier.Notifier) .AsParallel().ForAll(async notifier => await SendMessageAsync(notifier, message, recipients)); }
public CrmCredentialManager(IAppSettingsManager appSettingsManager) { _appSettingsManager = appSettingsManager; _username = _appSettingsManager.RetrieveUsername(); _region = _appSettingsManager.RetrieveRegion(); _orgName = _appSettingsManager.RetrieveOrgName(); if (GetCanConnectWithSavedCredentials()) { _canConnectWithSavedCredentials = true; } if (_canConnectWithSavedCredentials) { if (GetUseSavedCredentials()) { _useSavedCredentials = true; } } }
public SettingsWindowViewModel( IAppSettingsManager appSettingsManager, IBackgroundTaskService backgroundTaskService, IServiceProvider serviceProvider, IKeySetProviderService keySetProviderService, ILoggerFactory loggerFactory) { _appSettingsManager = appSettingsManager ?? throw new ArgumentNullException(nameof(appSettingsManager)); _backgroundTaskService = backgroundTaskService ?? throw new ArgumentNullException(nameof(backgroundTaskService)); _serviceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider)); _keySetProviderService = keySetProviderService ?? throw new ArgumentNullException(nameof(keySetProviderService)); _logger = (loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory))).CreateLogger(this.GetType()); _appSettings = appSettingsManager.Settings; BrowseProdKeysCommand = new RelayCommand(BrowseProdKeys); BrowseConsoleKeysCommand = new RelayCommand(BrowseConsoleKeys); BrowseTitleKeysCommand = new RelayCommand(BrowseTitleKeys); SaveSettingsCommand = new RelayCommand(SaveSettings); CancelSettingsCommand = new RelayCommand(CancelSettings); DownloadProdKeysCommand = new RelayCommand(DownloadProdKeys, CanDownloadProdKeys); DownloadTitleKeysCommand = new RelayCommand(DownloadTitleKeys, CanDownloadTitleKeys); EditProdKeysCommand = new RelayCommand(EditProdKeys, CanEditProdKeys); EditTitleKeysCommand = new RelayCommand(EditTitleKeys, CanEditTitleKeys); EditConsoleKeysCommand = new RelayCommand(EditConsoleKeys, CanEditConsoleKeys); ProdKeysFilePath = _appSettings.ProdKeysFilePath; ConsoleKeysFilePath = _appSettings.ConsoleKeysFilePath; TitleKeysFilePath = _appSettings.TitleKeysFilePath; SelectedLogLevel = _appSettings.LogLevel; ProdKeysDownloadUrl = _appSettings.ProdKeysDownloadUrl; TitleKeysDownloadUrl = _appSettings.TitleKeysDownloadUrl; AlwaysReloadKeysBeforeOpen = _appSettings.AlwaysReloadKeysBeforeOpen; TitlePageUrl = _appSettings.TitlePageUrl; this.SelectedLanguage = LocalizationManager.Instance.Current; _backgroundTaskService.PropertyChanged += (_, args) => { if (args.PropertyName == nameof(IBackgroundTaskService.IsRunning)) { DownloadProdKeysCommand.TriggerCanExecuteChanged(); DownloadTitleKeysCommand.TriggerCanExecuteChanged(); } }; _keySetProviderService.PropertyChanged += (_, args) => { if (args.PropertyName == nameof(IKeySetProviderService.ActualProdKeysFilePath)) { NotifyPropertyChanged(nameof(ActualProdKeysFilePath)); } else if (args.PropertyName == nameof(IKeySetProviderService.ActualTitleKeysFilePath)) { NotifyPropertyChanged(nameof(ActualTitleKeysFilePath)); } else if (args.PropertyName == nameof(IKeySetProviderService.ActualConsoleKeysFilePath)) { NotifyPropertyChanged(nameof(ActualConsoleKeysFilePath)); } }; }
public WithinQueryBuilder(IAppSettingsManager appSettingsManager) { _appSettingsManager = appSettingsManager; _queryType = QueryType.Within; }
public PresetsViewModel(INavigationService navigationService, IAppSettingsManager appSettingsManager, IUserDialogs userDialogs) : base(navigationService) { _appSettingsManager = appSettingsManager; _userDialogs = userDialogs; }
public ConfigureAsAPViewModel(INavigationService navigationService, IUserDialogs userDialogs, IAppSettingsManager appSettingsManager) : base(navigationService) { _userDialogs = userDialogs; _appSettingsManager = appSettingsManager; _client = new HttpClient(); }
public LocalBlobStorageManager(IAppSettingsManager appSettingsManager) { this.appSettingsManager = appSettingsManager; InitPaths(); }
public PresetDetailsViewModel(INavigationService navigationService, IAppSettingsManager appSettingsManager) : base(navigationService) { _appSettingsManager = appSettingsManager; _PresetModel = new PresetModel(0, 0); }
public AutodetectViewModel(INavigationService navigationService, IUserDialogs userDialogs, IAppSettingsManager appSettingsManager) : base(navigationService) { _userDialogs = userDialogs; _appSettingsManager = appSettingsManager; }
public FilebasedStorageManager(IAppSettingsManager appSettingsManager) { this.appSettingsManager = appSettingsManager; }
public MainViewModel(IAppSettingsManager settingsManager) { _settingsManager = settingsManager; }
public AppSettingsController(IAppSettingsManager appSettingsManager) { _appSettingsManager = appSettingsManager; }