public AccountSettingsViewModel( INavigation navigation, IAppSettings appSettings) : base(navigation) { this.appSettings = appSettings; }
public SeqRequestLogsFeature() { appSettings = AppHostBase.Instance.AppSettings; if (log.IsDebugEnabled) log.Debug($"Using {appSettings.GetType().Name} appSettings for appSettings provider"); }
public MailRuAuthProvider(IAppSettings appSettings) : base(appSettings, Realm, Name) { this.AuthorizeUrl = this.AuthorizeUrl ?? Realm; this.AccessTokenUrl = this.AccessTokenUrl ?? "https://connect.mail.ru/oauth/token"; this.UserProfileUrl = this.UserProfileUrl ?? "https://www.appsmail.ru/platform/api"; }
protected virtual void Init(IAppSettings appSettings = null) { InitSchema = true; RequireSecureConnection = true; Environments = DefaultEnvironments; KeyTypes = DefaultTypes; KeySizeBytes = DefaultKeySizeBytes; CreateApiKeyFn = CreateApiKey; if (appSettings != null) { InitSchema = appSettings.Get("apikey.InitSchema", true); RequireSecureConnection = appSettings.Get("apikey.RequireSecureConnection", true); var env = appSettings.GetString("apikey.Environments"); if (env != null) Environments = env.Split(ConfigUtils.ItemSeperator); var type = appSettings.GetString("apikey.KeyTypes"); if (type != null) KeyTypes = type.Split(ConfigUtils.ItemSeperator); var keySize = appSettings.GetString("apikey.KeySizeBytes"); if (keySize != null) KeySizeBytes = int.Parse(keySize); } ServiceRoutes = new Dictionary<Type, string[]> { { typeof(GetApiKeysService), new[] { "/apikeys", "/apikeys/{Environment}" } }, { typeof(RegenrateApiKeysService), new [] { "/apikeys/regenerate", "/apikeys/regenerate/{Environment}" } }, }; }
public HomeController(IMessageCounter messageCounter, IDataService dataService, IConfiguration configuration, IAppSettings appSettings) { _messageCounter = messageCounter; _dataService = dataService; _configuration = configuration; _appSettings = appSettings; }
public FacebookAuthProvider(IAppSettings appSettings) : base(appSettings, Realm, Name, "AppId", "AppSecret") { this.AppId = appSettings.GetString("oauth.facebook.AppId"); this.AppSecret = appSettings.GetString("oauth.facebook.AppSecret"); this.Permissions = appSettings.Get("oauth.facebook.Permissions", new string[0]); }
public static FluentConfiguration ConfigureDatabase(this FluentConfiguration config, IAppSettings appSettings) { #if DEBUG return config.DebugDatabase(); #endif return config.ProductionDatabase(); }
public void Setup() { var tcb = new TestControllerBuilder(); context = new AuthorizationContext {HttpContext = tcb.HttpContext}; appSettings = MockRepository.GenerateStub<IAppSettings>(); filter = new EnsureSsl(appSettings); }
public AdministrationViewModel(ICustomAppearanceManager appearanceManager, IAppSettings appSettings) { this.appearanceManager = appearanceManager; this.appSettings = appSettings; selectedAccentColor = appearanceManager.AccentColor; selectedTextColor = appearanceManager.TextColor; }
public LimitProviderBaseTests() { keyGenerator = A.Fake<ILimitKeyGenerator>(); appSetting = A.Fake<IAppSettings>(); limitProvider = new LimitProviderBase(keyGenerator, appSetting); }
public LoginViewModel(IAuthenticationService authenticationService, IAppSettings appSettings, IDialogService dialogService, IStatisticsService statisticsService) { _authenticationService = authenticationService; _appSettings = appSettings; _dialogService = dialogService; _statisticsService = statisticsService; }
public FourSquareOAuth2Provider(IAppSettings appSettings) : base(appSettings, Realm, Name) { this.AuthorizeUrl = this.AuthorizeUrl ?? Realm; this.AccessTokenUrl = this.AccessTokenUrl ?? "https://foursquare.com/oauth2/access_token"; this.UserProfileUrl = this.UserProfileUrl ?? "https://api.foursquare.com/v2/users/self"; // https://developer.foursquare.com/overview/versioning DateTime versionDate; if (!DateTime.TryParse(appSettings.GetString("oauth.{0}.Version".Fmt(Name)), out versionDate)) versionDate = DateTime.UtcNow; // version dates before June 9, 2012 will automatically be rejected if (versionDate < new DateTime(2012, 6, 9)) versionDate = DateTime.UtcNow; this.Version = versionDate; // Profile Image URL requires dimensions (Width x height) in the URL (default = 64x64 and minimum = 16x16) int profileImageWidth; if (!int.TryParse(appSettings.GetString("oauth.{0}.ProfileImageWidth".Fmt(Name)), out profileImageWidth)) profileImageWidth = 64; this.ProfileImageWidth = Math.Max(profileImageWidth, 16); int profileImageHeight; if (!int.TryParse(appSettings.GetString("oauth.{0}.ProfileImageHeight".Fmt(Name)), out profileImageHeight)) profileImageHeight = 64; this.ProfileImageHeight = Math.Max(profileImageHeight, 16); Scopes = appSettings.Get("oauth.{0}.Scopes".Fmt(Name), new[] { "basic" }); }
public SamlAuthProvider(IAppSettings appSettings, string authRealm, string provider, X509Certificate2 signingCert) { Logger.Info("SamlAuthProvider Starting up for Realm: {0}, Provider: {1}".Fmt(authRealm, provider)); this.AuthRealm = appSettings != null ? appSettings.Get("SamlRealm", authRealm) : authRealm; this.Provider = provider; this.SamlSigningCert = signingCert; if(appSettings != null) { this.CallbackUrl = appSettings.GetString("saml.{0}.CallbackUrl".Fmt(provider)) ?? this.FallbackConfig(appSettings.GetString("saml.CallbackUrl")); this.IdpInitiatedRedirect = appSettings.GetString("saml.{0}.IdpInitiatedRedirect".Fmt(provider)) ?? this.FallbackConfig(appSettings.GetString("saml.IdpInitiatedRedirect")); this.RedirectUrl = appSettings.GetString("saml.{0}.RedirectUrl".Fmt(provider)) ?? this.FallbackConfig(appSettings.GetString("saml.RedirectUrl")); this.LogoutUrl = appSettings.GetString("saml.{0}.LogoutUrl".Fmt(provider)) ?? this.FallbackConfig(appSettings.GetString("saml.LogoutUrl")); this.Issuer = appSettings.GetString("saml.{0}.Issuer".Fmt(provider)) ?? this.FallbackConfig(appSettings.GetString("saml.Issuer")); this.AuthorizeUrl = appSettings.GetString("saml.{0}.AuthorizeUrl".Fmt(provider)) ?? this.FallbackConfig(appSettings.GetString("saml.AuthorizeUrl")); this.SamlResponseFormKey = appSettings.GetString("saml.{0}.ResponseFormKey".Fmt(provider)) ?? this.FallbackConfig(appSettings.GetString("saml.ResponseFormKey")); Logger.Info("Obtained the following settings from appSettings"); Logger.Info(new { this.CallbackUrl, this.RedirectUrl, this.LogoutUrl, this.Issuer, this.AuthorizeUrl, this.SamlResponseFormKey }.ToJson()); } }
public RemoteDataService(IDataSource dataSource, IAppSettings appSettings) { _appSettings = appSettings; _dataSource = dataSource; _httpClient = new HttpClient(); }
public Nemesis(IAppSettings appSettings) { if (appSettings == null) throw new ArgumentNullException("appSettings"); _value = appSettings.ServiceCallNemesis; }
public AppConfig(IAppSettings appSettings) { this.Env = appSettings.Get("Env", Env.Local); this.EnableCdn = appSettings.Get("EnableCdn", false); this.CdnPrefix = appSettings.Get("CdnPrefix", ""); this.AdminUserNames = appSettings.Get("AdminUserNames", new List<string>()); }
public GroupDetailsViewModel(IAppSettings appSettings, IDataServiceFactory dataServiceFactory, IMvxResourceLoader resourceLoader) : base(appSettings) { _dataServiceFactory = new DataServiceFactory(appSettings, _resourceLoader); _resourceLoader = resourceLoader; _groupedItems = new ObservableCollection<Group<Item>>(); }
HexBoxFileTabContentCreator(Lazy<IHexDocumentManager> hexDocumentManager, IMenuManager menuManager, IHexEditorSettings hexEditorSettings, IAppSettings appSettings, Lazy<IHexBoxUndoManager> hexBoxUndoManager) { this.hexDocumentManager = hexDocumentManager; this.menuManager = menuManager; this.hexEditorSettings = hexEditorSettings; this.appSettings = appSettings; this.hexBoxUndoManager = hexBoxUndoManager; }
public OrdersController( IQuartetClientFactory clientFactory, IMappingService<Order, OrderViewModel> orderMapping, IMappingService<Customer, HCardViewModel> hcardMapping, IMappingService<Address, AddressViewModel> addressMapping, IMailingService mailingService, IInvoicingService invoicingService, IFeaturesConfigService featuresConfigService, IAppSettings appSettings, IConsultantContext consultantContext, IConsultantDataServiceClientFactory consultantDataServiceClientFactory, IPromotionService promotionService, IProductCatalogClientFactory productCatalogClientFactory, IInventoryService inventoryService, ISubsidiaryAccessor subsidiaryAccessor ) { _clientFactory = clientFactory; _orderMapping = orderMapping; _hcardMapping = hcardMapping; _addressMapping = addressMapping; _mailingService = mailingService; _invoicingService = invoicingService; _featuresConfigService = featuresConfigService; _appSettings = appSettings; _consultantContext = consultantContext; _consultantDataServiceClientFactory = consultantDataServiceClientFactory; _promotionService = promotionService; _productCatalogClientFactory = productCatalogClientFactory; _inventoryService = inventoryService; _subsidiaryAccessor = subsidiaryAccessor; }
public YandexAuthProvider(IAppSettings appSettings) : base(appSettings, Realm, Name, "AppId", "AppPassword") { ApplicationId = appSettings.GetString("oauth.Yandex.AppId"); ApplicationPassword = appSettings.GetString("oauth.Yandex.AppPassword"); AccessTokenUrl = TokenUrl; }
public TodoModule(IAppSettings appSettings, ITodoService todoService, IServiceBus bus) { _todoService = todoService; _bus = bus; Post["/todo"] = _ => { var slashCommand = this.Bind<SlashCommand>(); if (slashCommand == null || slashCommand.command.Missing()) { Log.Info("Rejected an incoming slash command (unable to parse request body)."); return HttpStatusCode.BadRequest.WithReason("Unable to parse slash command."); } if (!appSettings.Get("todo:slackSlashCommandToken").Equals(slashCommand.token)) { Log.Info("Blocked an unauthorized slash command."); return HttpStatusCode.Unauthorized.WithReason("Missing or invalid token."); } if (!slashCommand.command.Equals("/todo", StringComparison.InvariantCultureIgnoreCase)) { Log.Info("Rejected an incoming slash command ({0} is not handled by this module).", slashCommand.command); return HttpStatusCode.BadRequest.WithReason("Unsupported slash command."); } var responseText = HandleTodo(slashCommand); if (responseText.Missing()) { return HttpStatusCode.OK; } return responseText; }; }
/// <summary> /// Initializes a new instance of the <see cref="YammerAuthProvider"/> class. /// </summary> /// <param name="appSettings"> /// The application settings (in web.config). /// </param> public YammerAuthProvider(IAppSettings appSettings) : base(appSettings, appSettings.GetString("oauth.yammer.Realm"), Name, "ClientId", "AppSecret") { this.ClientId = appSettings.GetString("oauth.yammer.ClientId"); this.ClientSecret = appSettings.GetString("oauth.yammer.ClientSecret"); this.PreAuthUrl = appSettings.GetString("oauth.yammer.PreAuthUrl"); }
protected virtual void Init(IAppSettings appSettings = null) { InitSchema = true; RequireSecureConnection = true; Environments = DefaultEnvironments; KeyTypes = DefaultTypes; KeySizeBytes = DefaultKeySizeBytes; CreateApiKeyFn = CreateApiKey; if (appSettings != null) { InitSchema = appSettings.Get("apikey.InitSchema", true); RequireSecureConnection = appSettings.Get("apikey.RequireSecureConnection", true); var env = appSettings.GetString("apikey.Environments"); if (env != null) Environments = env.Split(ConfigUtils.ItemSeperator); var type = appSettings.GetString("apikey.KeyTypes"); if (type != null) KeyTypes = type.Split(ConfigUtils.ItemSeperator); var keySize = appSettings.GetString("apikey.KeySizeBytes"); if (keySize != null) KeySizeBytes = int.Parse(keySize); } }
public GithubAuthProvider(IAppSettings appSettings) : base(appSettings, Realm, Name, "ClientId", "ClientSecret") { ClientId = appSettings.GetString("oauth.github.ClientId"); ClientSecret = appSettings.GetString("oauth.github.ClientSecret"); Scopes = appSettings.Get("oauth.github.Scopes", new[] { "user" }); }
public KeyChord(IKeyboard keyboard, IAppSettings settings) { _pressedKeys = new List<VirtualKeyCode>(); _keyboard = keyboard; if(settings.Chord }
public LoginViewModel(IFlowdockContext context, IAppSettings settings, INavigationManager navigationManager) { _context = context.ThrowIfNull("context"); _settings = settings.ThrowIfNull("storage"); _navigationManager = navigationManager.ThrowIfNull("navigationManager"); _loginCommand = new LoginCommand(this, context); _loginCommand.LoggedIn += OnLoggedIn; }
public SettingsCollection(IAppSettings appSettings, IJiraConnectionSettings jiraConnectionSettings, IUiSettings uiSettings, IInternalSettings internalSettings, IExportSettings exportSettings) { AppSettings = appSettings; JiraConnectionSettings = jiraConnectionSettings; UiSettings = uiSettings; InternalSettings = internalSettings; ExportSettings = exportSettings; }
public TrackUsage(IAppSettings appSettings, IInternalSettings internalSettings, InstanceType instanceType) { this.appSettings = appSettings; this.instanceType = instanceType; SetTrackingQueryString(internalSettings); SetupBrowser(); TrackAppUsage(TrackingType.AppLoad); }
public FacebookAuthProvider(IAppSettings appSettings) : base(appSettings, Realm, Name, "AppId", "AppSecret") { this.AppId = appSettings.GetString("oauth.facebook.AppId"); this.AppSecret = appSettings.GetString("oauth.facebook.AppSecret"); this.Permissions = appSettings.Get("oauth.facebook.Permissions", TypeConstants.EmptyStringArray); this.Fields = appSettings.Get("oauth.facebook.Fields", DefaultFields); }
public DummyMailChimpWebhooks(IAppSettings appSettings) { if (appSettings == null) { throw new ArgumentNullException("appSettings"); } _appSettings = appSettings; }
public RateViewModel(IMvxNavigationService navigationService, IDataService dataService, IAppSettings settings) { _navigationService = navigationService; _dataService = dataService; _settings = settings; InitCommands(); }
public MultiFileOpener(IAppSettings appSettings) { m_AppSettings = appSettings; EventAggregator <EditorViewInitializationCompleted> .Instance.Event += OnEditorViewInitializationCompleted; }
public AppConfig(IAppSettings appConfig) { RedisHostAddress = appConfig.Get("RedisHostAddress", "localhost:6379"); RedisDb = appConfig.Get("RedisDb", 0); DefaultRedirectPath = appConfig.Get("DefaultRedirectPath", "AjaxClient/"); }
public TimeStringValidator(IAppSettings appSettings) { pattern = appSettings.Get("time.pattern", CommonConstant.Pattern["time"]); }
public Helper_AD(IAppSettings settings, ILog log) { _settings = settings; _log = log; }
public StaticFileHandler(IAppSettings appSettings, IHandlerUtility util) { this.appSettings = appSettings; this.util = util; }
/// <summary> /// Constructor /// </summary> /// <param name="appSettings"></param> public ContainerDataManagement(IAppSettings appSettings) { this.appSettings = appSettings; }
public NeighborsSelector(IAppSettings settings, ICountryCollection collection) { _settings = settings; _collection = collection; }
public MemoryCacheService(IAppSettings appSettings, IMemoryCache memoryCache) { this.appSettings = appSettings; this.memoryCache = memoryCache; }
public AccountDataStoreFactory(IAppSettings appSettings) { _appSettings = appSettings; }
internal PosteriorViewModel(IAppState appState, IAppService appService, IAppSettings appSettings, ModuleState moduleState) { _appState = appState; _moduleState = moduleState; _reactiveSafeInvoke = appService.GetReactiveSafeInvoke(); PlotModel = new PlotModel() { LegendPlacement = LegendPlacement.Inside, LegendPosition = LegendPosition.RightTop, LegendOrientation = LegendOrientation.Vertical }; _horizontalAxis = new LinearAxis { Position = AxisPosition.Bottom }; PlotModel.Axes.Add(_horizontalAxis); _leftVerticalAxis = new LinearAxis { Title = "Frequency", Position = AxisPosition.Left, Key = nameof(_leftVerticalAxis) }; PlotModel.Axes.Add(_leftVerticalAxis); _rightVerticalAxis = new LinearAxis { Title = "Probability", Position = AxisPosition.Right, Key = nameof(_rightVerticalAxis) }; PlotModel.Axes.Add(_rightVerticalAxis); PlotModel.ApplyThemeToPlotModelAndAxes(); using (_reactiveSafeInvoke.SuspendedReactivity) { _subscriptions = new CompositeDisposable( appSettings .GetWhenPropertyChanged() .Subscribe( _reactiveSafeInvoke.SuspendAndInvoke <string?>( ObserveAppSettingsPropertyChange ) ), moduleState .ObservableForProperty(ms => ms.EstimationDesign) .Subscribe( _reactiveSafeInvoke.SuspendAndInvoke <object>( ObserveModuleStateEstimationDesign ) ), moduleState .WhenAnyValue( ms => ms.ChainStates, ms => ms.PosteriorState ) .Subscribe( _reactiveSafeInvoke.SuspendAndInvoke <(Arr <ChainState>, PosteriorState?)>( ObserveModuleStateEstimationDataChange ) ), this .ObservableForProperty(vm => vm.SelectedParameterName) .Subscribe( _reactiveSafeInvoke.SuspendAndInvoke <object>( ObserveSelectedParameterName ) ) ); if (CanConfigureControls) { PopulateControls(); } if (CanViewPosterior) { PopulatePosterior(); } } }
public HomeViewModel(IStatisticsService statisticsService, IAppSettings appSettings) { _statisticsService = statisticsService; _appSettings = appSettings; }
public ForecastService(IAppSettings appSettings) { _appSettings = appSettings; }
public MemoryContent(IWpfCommandService wpfCommandService, IThemeService themeService, IMenuService menuService, IHexEditorSettings hexEditorSettings, IMemoryVM memoryVM, IAppSettings appSettings) { this.memoryControl = new MemoryControl(); this.vmMemory = memoryVM; this.vmMemory.SetRefreshLines(() => this.memoryControl.DnHexBox.RedrawModifiedLines()); this.memoryControl.DataContext = this.vmMemory; var dnHexBox = new DnHexBox(menuService, hexEditorSettings) { CacheLineBytes = true, IsMemory = true, }; dnHexBox.SetBinding(HexBox.DocumentProperty, nameof(vmMemory.HexDocument)); this.memoryControl.DnHexBox = dnHexBox; dnHexBox.StartOffset = 0; dnHexBox.EndOffset = IntPtr.Size == 4 ? uint.MaxValue : ulong.MaxValue; appSettings.PropertyChanged += AppSettings_PropertyChanged; UpdateHexBoxRenderer(appSettings.UseNewRenderer_HexEditor); wpfCommandService.Add(ControlConstants.GUID_DEBUGGER_MEMORY_CONTROL, memoryControl); wpfCommandService.Add(ControlConstants.GUID_DEBUGGER_MEMORY_HEXBOX, memoryControl.DnHexBox); }
public void InitData(string dir, IAppSettings appSettings) { }
public AadAuthProvider(string clientId, string clientSecret, IAppSettings appSettings) : this(appSettings) { ClientId = clientId; ClientSecret = clientSecret; }
public JwtAuthProviderReader(IAppSettings appSettings) : base(appSettings, Realm, Name) { Init(appSettings); }
public HomeController(IStorageFactory storageFactory, IAppSettings settings) { _storageFactory = storageFactory; _settings = settings; }
public OpenIdOAuthProvider(IAppSettings appSettings, string name = DefaultName, string realm = null) : base(appSettings, realm, name) { }
/// <summary> /// Constructor /// </summary> /// <param name="appSettings"></param> public GenerateNewPath([NotNull] IAppSettings appSettings) { _appSettings = appSettings ?? throw new ArgumentNullException(nameof(appSettings)); }
public HandleSendEmailWithResults(IBusAdapter bus, IMailMessageService mailMessageService, IMailSender mailSender, IAppSettings appSettings) { _bus = bus; _mailMessageService = mailMessageService; _mailSender = mailSender; _appSettings = appSettings; }
public JwtAuthProvider(IAppSettings appSettings) : base(appSettings) { }
public AttributeLimitProvider(IAppSettings appSettings) { appSettings.ThrowIfNull(nameof(appSettings)); this.appSettings = appSettings; }
public EnsureSsl(IAppSettings settings) { this.settings = settings; }
public HalRequestsBuilder(IAppSettings appsetings) { _baseUri = appsetings.BaseUri; }
public ApiKeyAuthProvider(IAppSettings appSettings) : base(appSettings, Realm, Name) { Init(appSettings); }
public TrexRegistrator(ITrexBaseContextProvider trexBaseContextProvider, IMembershipService membershipService, IEmailService emailService, IAppSettings appSettings) { _trexBaseContextProvider = trexBaseContextProvider; _membershipService = membershipService; _emailService = emailService; _appSettings = appSettings; }
/// <summary> /// Initializes a new instance of the <see cref="SlackLogFactory"/> class. /// Configuration from IAppSettings looking at keys with prefix "ServiceStack.Logging.Slack.". /// Eg, <add key="ServiceStack.Logging.Slack.DefaultChannel" value="LoggingChannel" /> /// </summary> /// <param name="incomingWebHookUrl"></param> /// <param name="appSettings">Further config provided by an IAppSettings instance.</param> public SlackLogFactory(string incomingWebHookUrl, IAppSettings appSettings) : this(appSettings) { this.incomingWebHookUrl = incomingWebHookUrl; }
public ConnectionStringsExtended(ConnectionStringSettingsCollection raw, IAppSettings appSettings, IEnumerable <IConnectionStringInterceptor> interceptors = null) { _appSettings = appSettings; _interceptors = interceptors ?? new List <IConnectionStringInterceptor>(); Raw = raw; }
public ApiAppVersion(IAppSettings appSettings, Common.Configuration.Config appConfig) { _appConfig = appConfig; _appSettings = appSettings; }