public EventLogFilterRepo(ISettingsProvider settingsProvider, IEventRecordTimeSpanSearcher eventRecordTimeSpanSearcher, ICacheLayer sweetCacheLayer) { EventLogCache = sweetCacheLayer; ListOfServersToQuery = settingsProvider.ServersToQuery; SearchTermsList = settingsProvider.FilterTerm; EventRTimeSearcher = eventRecordTimeSpanSearcher; }
public TagConverter(ISettingsProvider settingsProvider) { using (var reader = new StreamReader(settingsProvider.Get<string>(SettingsKeys.TagMappingFile))) { normalizedTags = reader .ReadAllLines() .Where(x => !string.IsNullOrWhiteSpace(x)) .Select(ParseTagDescription) .ToDictionary(x => x.Name, x => x.RawTags); rawTagsMapping = normalizedTags .SelectMany(normalizedTag => normalizedTag.Value.Select(rawTag => new { Normalized = normalizedTag.Key, Raw = rawTag })) .ToDictionary(x => x.Raw, x => x.Normalized); } using (var reader = new StreamReader(settingsProvider.Get<string>(SettingsKeys.CorrectionsFile))) { correctionsByProblemUrl = reader .ReadAllLines() .Where(x => !string.IsNullOrWhiteSpace(x)) .SelectMany(ParseCorrections) .GroupBy(x => x.ProblemUrl) .ToDictionary(x => x.Key, x => x.ToArray()); } }
public SettingsViewModel( IScreen screen, ISettingsProvider settingsProvider, IFolderHelper folderHelper, IAppContext appContext) { HostScreen = screen; BackCommand = new ReactiveAsyncCommand(); BackCommand.RegisterAsyncAction(_ => HostScreen.Router.NavigateBack.Execute(null)); SelectFolder = new ReactiveAsyncCommand(); SelectFolder.RegisterAsyncAction(_ => { var result = folderHelper.SelectFolder(); if (result.Result == true) { UpdateLocation = result.Folder; } }, appContext.DispatcherScheduler); UpdateLocation = settingsProvider.UpdateLocation; _IsError = this.WhenAny(vm => vm.UpdateLocation, vm => vm.Value) .DistinctUntilChanged() .Throttle(TimeSpan.FromMilliseconds(500)) .ObserveOn(appContext.DispatcherScheduler) .Select(text => !IsUrlOrFolder(text)) .Do(error => { if (!error) { settingsProvider.UpdateLocation = UpdateLocation; } }) .ToProperty(this, vm => vm.IsError, setViaReflection: false); }
public TestableSolutionPackageRepository ( ISolution solution, IMonoDevelopPackageRepositoryFactory repositoryFactory, ISettingsProvider settingsProvider) : base (solution, repositoryFactory, settingsProvider) { }
// ReSharper restore UnusedAutoPropertyAccessor.Global //public InstallController(Func<IProviderInfo<IDatabaseProvider>> databaseProvidersInfo) public InstallController(IDatabaseProvider databaseProvider, Func<IProviderInfo<IDatabaseProvider>> databaseProvidersInfo, ISettingsProvider settingsProvider, IFederatedAuthenticationService federatedAuthenticationService) { this.databaseProvider = databaseProvider; this.databaseProvidersInfo = databaseProvidersInfo; this.settingsProvider = settingsProvider; this.federatedAuthenticationService = federatedAuthenticationService; }
public RouteQueryModule(ISettingsProvider settingsProvider) : base("/query") { _settingsProvider = settingsProvider; this.EnableCors(); Get["/stations"] = parameters => { IEnumerable<IStation> stations = GetStations(); return stations != null ? Response.AsJson(stations).WithContentType(@"application/json; charset=utf-8") : new Response().WithStatusCode(HttpStatusCode.InternalServerError); }; Get["/station/{StationId}"] = parameters => { IEnumerable<IRoute> stationRoutes = GetStationRoutes(parameters.StationId); return stationRoutes != null ? Response.AsJson(stationRoutes) : new Response().WithStatusCode(HttpStatusCode.InternalServerError); }; Get["/date/{Date}/route/{TrainNo}/from/{FromId}/to/{ToId}"] = parameters => { DateTime date = DateTime.ParseExact(parameters.Date, "yyyyMMdd", CultureInfo.InvariantCulture); IEnumerable<ITrainRoute> trainRoutes = GetTrainRoutes(date, parameters.TrainNo, parameters.FromId, parameters.ToId); return trainRoutes != null ? Response.AsJson(trainRoutes) : new Response().WithStatusCode(HttpStatusCode.InternalServerError); }; }
public ProjectSyncConfiguration(ISettingsProvider provider) { var ignored = provider.GetSettings("IgnoreDirectories"); IgnoredDirectories = string.IsNullOrEmpty(ignored) ? new string[] {} : ignored.Split(',').Select(x => x.Trim()).ToArray(); }
public CommentsController(ICommentRepository commentRepository, ISettingsProvider settingsProvider) { _commentRepository = commentRepository; _settingsProvider = settingsProvider; PageSize = _settingsProvider.GetSettings().PageSize; }
public PreferencesViewModel(ISettingsProvider settingsProvider, IScreenManager screenManager) { this.settingsProvider = settingsProvider; Screens = new ObservableCollection<DetailedScreen>(screenManager.GetScreens()); Settings = settingsProvider.GetSettings<PopupSettings>(); PlaceScreen(); AvailableColors = new ObservableCollection<AvailableColor>(); var properties = typeof(Colors).GetProperties(BindingFlags.Static | BindingFlags.Public); foreach (var prop in properties) { var name = prop.Name; var value = (Color)prop.GetValue(null, null); var availableColor = new AvailableColor(name, value); if (Settings.FontColor == name) FontColor = availableColor; if (Settings.ItemBackgroundColor == name) ItemBackgroundColor = availableColor; AvailableColors.Add(availableColor); } SaveCommand = new DelegateCommand(SaveSettings); ResetToDefaultsCommand = new DelegateCommand(() => settingsProvider.ResetToDefaults<PopupSettings>()); VisitCommand = new DelegateCommand(Visit); }
public void Initialize(string registrySettingsPath, IContentEditorLogger logger, IContentTarget contentTarget, ISettingsProvider settingsProvider) { try { GlobalEditorOptions.Init(contentTarget, settingsProvider); HtmlEditorControl.AllowCachedEditor(); Assembly assembly = Assembly.GetExecutingAssembly(); ApplicationEnvironment.Initialize(assembly, Path.GetDirectoryName(assembly.Location), registrySettingsPath, contentTarget.ProductName); ContentSourceManager.Initialize(false); Trace.Listeners.Clear(); if (logger != null) { _logger = new RedirectionLogger(logger); Trace.Listeners.Add(_logger); } #if DEBUG Trace.Listeners.Add(new DefaultTraceListener()); #endif } catch (Exception e) { Trace.Fail("Failed to initialize Shared Canvas: " + e); Trace.Flush(); throw; } }
/// <summary> /// Constructor. /// </summary> /// <param name="project">Project.</param> /// <param name="pathResolver">File path resolver.</param> /// <param name="settings">Settings.</param> public NodeLauncher(NodeProjectNode project, IPathResolver pathResolver, ISettingsProvider settings) { Utilities.ArgumentNotNull("project", project); _project = project; _pathResolver = pathResolver; _settings = settings; }
public DocumentViewModel( IDialogService dialogService, IWindowManager windowManager, ISiteContextGenerator siteContextGenerator, Func<string, IMetaWeblogService> getMetaWeblog, ISettingsProvider settingsProvider, IDocumentParser documentParser) { this.dialogService = dialogService; this.windowManager = windowManager; this.siteContextGenerator = siteContextGenerator; this.getMetaWeblog = getMetaWeblog; this.settingsProvider = settingsProvider; this.documentParser = documentParser; FontSize = GetFontSize(); title = "New Document"; Original = ""; Document = new TextDocument(); Post = new Post(); timer = new DispatcherTimer(); timer.Tick += TimerTick; timer.Interval = delay; }
public TestIndicesUtilCustomization( IRequestConfiguration requestConfig, ISettingsProvider settings = null) { this.settings = settings; this.requestConfig = requestConfig; }
protected override void Context() { _smtpWrapper = new SmtpWrapper("localhost"); _settingsProvider = new SettingsProvider(); _emailService = new EmailService(_smtpWrapper, _settingsProvider); }
public MainViewModel() { _entryProvider = ProC.GetInstance<IEntryProvider>(); _settingsProvider = ProC.GetInstance<ISettingsProvider>(); Initialize(); }
public MongoContext() { this.settingsProvider = ServiceProvider.Current.GetService<ISettingsProvider>(); var settings = this.settingsProvider.Get<MongoSettings>(); GetDatabase(settings); }
public SubActivityDao(ISession session, ISettingsProvider<SubSettings> subSettings, ICache cache) : base(session, subSettings) { _cache = cache; }
public TagsController(ITagRepository tagRepository, ISettingsProvider settingsProvider) { _tagRepository = tagRepository; _settingsProvider = settingsProvider; PageSize = _settingsProvider.GetSettings().PageSize; }
public AssemblyBusServiceConfigurator(IEnumerable<IEndpointSpecification> endpointSpecifications, IServiceSpecification serviceSpecification, ISettingsProvider settingsProvider) { _serviceSpecification = serviceSpecification; _settingsProvider = settingsProvider; _endpointSpecifications = endpointSpecifications.ToArray(); }
public Server(ISettingsProvider settingsProvider) { SettingsProvider = settingsProvider; // Touch TerrainGeneration to load it into app domain FlatlandGenerator.DefaultGeneratorOptions.ToString(); var generator = Level.GetGenerator(SettingsProvider.Get<string>("level.type")); if (generator == null) generator = new FlatlandGenerator(); Level level; if (Directory.Exists(SettingsProvider.Get<string>("level.name"))) level = Level.LoadFrom(SettingsProvider.Get<string>("level.name")); else { level = new Level(generator, SettingsProvider.Get<string>("level.name")); level.AddWorld("overworld"); level.SaveTo(SettingsProvider.Get<string>("level.name")); } MinecraftServer = new MinecraftServer(level); MinecraftServer.Settings.MotD = SettingsProvider.Get<string>("server.motd"); MinecraftServer.Settings.OnlineMode = SettingsProvider.Get<bool>("server.onlinemode"); MinecraftServer.ChatMessage += MinecraftServerOnChatMessage; MinecraftServer.PlayerLoggedIn += MinecraftServerOnPlayerLoggedIn; MinecraftServer.PlayerLoggedOut += MinecraftServerOnPlayerLoggedOut; //MinecraftServer.TabComplete += MinecraftServer_TabComplete; }
public DeploymentSettingsPrioritiesTests() { var settingsPriority1 = new Dictionary<string, string>(); settingsPriority1["key1"] = "settingsPriority1_value1"; settingsPriority1["key2"] = "settingsPriority1_value2"; settingsPriority1["key3"] = "settingsPriority1_value3"; settingsPriority1["key4"] = "settingsPriority1_value4"; var settingsPriority2 = new Dictionary<string, string>(); settingsPriority1["key2"] = "settingsPriority2_value2"; settingsPriority1["key3"] = "settingsPriority2_value3"; settingsPriority1["key5"] = "settingsPriority2_value5"; settingsPriority1["key6"] = "settingsPriority2_value6"; var settingsPriority50 = new Dictionary<string, string>(); settingsPriority1["key1"] = "settingsPriority50_value1"; settingsPriority1["key2"] = "settingsPriority50_value2"; settingsPriority1["key5"] = "settingsPriority50_value5"; settingsPriority1["key7"] = "settingsPriority50_value7"; var testProvider1 = new BasicSettingsProvider(settingsPriority1, (SettingsProvidersPriority)1); var testProvider2 = new BasicSettingsProvider(settingsPriority2, (SettingsProvidersPriority)2); var testProvider50 = new BasicSettingsProvider(settingsPriority50, (SettingsProvidersPriority)50); var settingsProviders = new ISettingsProvider[] { testProvider1, testProvider50, testProvider2 }; PerSiteSettingsProvider perSiteSettings = null; deploymentSettingsManager = new DeploymentSettingsManager(perSiteSettings, settingsProviders); }
public SolutionPackageRepositoryPath ( ISolution solution, ISettingsProvider settingsProvider) { this.solution = solution; PackageRepositoryPath = GetSolutionPackageRepositoryPath (settingsProvider); }
public BrowserStarter(ISettingsProvider settingsProvider) { var settings = settingsProvider.Load(); this.ExecutablePath = settings.BrowserExecutablePath; this.ExecutableArguments = settings.BrowserExecutableArguments; }
protected override void Context() { _sendEmailRequest = new SendMailRequest { To = "*****@*****.**", Subject = "important message for you bob", Message = "hi bob, this is not really that important. Just wanted to say hello." }; _smtpClient = MockRepository.GenerateStub<ISmtpWrapper>(); _smtpClient.Stub(x => x.Send(Arg<MailMessage>.Is.Anything)) .WhenCalled(x => _mailMessagePassedToSmtpWrapper = x.Arguments[0] as MailMessage); _settingsProvider = MockRepository.GenerateStub<ISettingsProvider>(); _settingsProvider.Stub(x => x.GetEmailSettings()) .Return(new EmailSettings{AdminEmailAddress = AdminEmailAddress}); _expectedMailMessage = new MailMessage(); _expectedMailMessage.To.Add(_sendEmailRequest.To); _expectedMailMessage.From = new MailAddress(AdminEmailAddress); _expectedMailMessage.Subject = _sendEmailRequest.Subject; _expectedMailMessage.Body = _sendEmailRequest.Message; _expectedMailMessage.IsBodyHtml = true; _emailService = new EmailService(_smtpClient, _settingsProvider); }
public RabbitMqHostBusFactory(ISettingsProvider settingsProvider) { RabbitMqSettings settings; if (!settingsProvider.TryGetSettings("RabbitMQ", out settings)) throw new ConfigurationException("The RabbitMQ settings were not available"); _hostSettings = new SettingsAdapter(settings); }
public RepositoryProvider(ISettingsProvider settingsProvider) { settings = settingsProvider; var dir = Directory.CreateDirectory(settings.GetStrSettingByName("PathToRepository", Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "repo"))); pathToRepo = dir.FullName; Name = new DirectoryInfo(pathToRepo).Name; LoadRepositoryInfo(pathToRepo); }
public SyncService(ISettingsProvider settingsProvider, ICalendarUpdateService calendarUpdateService, IMessageService messageService, ApplicationLogger applicationLogger) { _settingsProvider = settingsProvider; _calendarUpdateService = calendarUpdateService; _messageService = messageService; _applicationLogger = applicationLogger.GetLogger(GetType()); }
public PackageManagementOptions( Properties properties, ISettingsProvider settingsProvider) { this.properties = properties; registeredPackageSourceSettings = new RegisteredPackageSourceSettings(settingsProvider); packageRestoreConsent = new PackageRestoreConsent(settingsProvider.LoadSettings()); }
public BuildService(IVsoClient vsoClient, IMessenger messenger, ISettingsProvider settingsProvider) { _vsoClient = vsoClient; _messenger = messenger; _settingsProvider = settingsProvider; _messenger.Register<AccountSubscriptionUpdate>(this, UpdateSubscribedBuilds); }
public RijndaelStringEncrypter( ISettingsProvider settings, string salt ) { _encryptionProvider = new RijndaelManaged(); var saltBytes = UTF8Encoding.UTF8.GetBytes( salt ); var derivedbytes = new Rfc2898DeriveBytes( settings.EncryptionKey, saltBytes, 3 ); _key = derivedbytes.GetBytes( _encryptionProvider.KeySize / 8 ); _iv = derivedbytes.GetBytes( _encryptionProvider.BlockSize / 8 ); }
public InitializeDefaultSettingsStart(ICheckAllStartupConditions checkAllStartupConditions, IIniSettingsLoader iniSettingsLoader, ISettingsProvider settingsProvider, IInstallationPathProvider pathProvider, IDataStorageFactory storageFactory) : base(checkAllStartupConditions) { _iniSettingsLoader = iniSettingsLoader; _settingsProvider = settingsProvider; _pathProvider = pathProvider; _storageFactory = storageFactory; }
public SettingsTitleReplacerProvider(ISettingsProvider settingsProvider) { _settingsProvider = settingsProvider; }
public ProductsService(DataContext context, IRepository <Product> productsRepository, ISettingsProvider settings, IProductDtoMapper productMapper) { _context = context; _productsRepository = productsRepository; _productMapper = productMapper; _maxProductsCountDefault = settings.GetMaximumProductsCount; }
public RearRollAngleToFrontRollAngleExtractor(ISettingsProvider settingsProvider) : base(settingsProvider) { }
public SettingProviderContext(ISettingsProvider provider) { this.Provider = provider; this.IsSet = false; }
public IniSettingsLoader(ISettingsManager settingsManager, IDataStorageFactory dataStorageFactory) { _settingsProvider = settingsManager.GetSettingsProvider(); _dataStorageFactory = dataStorageFactory; }
public AzureContext(ILogProvider logProvider, IStatusProvider statusProvider, ISettingsProvider settingsProvider) { _LogProvider = logProvider; _StatusProvider = statusProvider; _SettingsProvider = settingsProvider; _TokenProvider = new AzureTokenProvider(_LogProvider); _AzureRetriever = new AzureRetriever(this); }
public PlaidClient(ISettingsProvider settings) { _settings = settings; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls; }
public ReplayController(IViewModelFactory viewModelFactory, ITelemetryViewsSynchronization telemetryViewsSynchronization, ISettingsProvider settingsProvider, TelemetryStoryBoardFactory telemetryStoryBoardFactory) { _propertyEventsEnabled = true; _storyboards = new Dictionary <string, TelemetryStoryboard>(); _storyBoardsShift = new Dictionary <string, TimeSpan>(); _viewModelFactory = viewModelFactory; _telemetryViewsSynchronization = telemetryViewsSynchronization; _settingsProvider = settingsProvider; _telemetryStoryBoardFactory = telemetryStoryBoardFactory; }
public GameServicesProvider(IGameServicesMetadataProvider <TGameServicesKeys> gameServicesMetadataProvider, ISettingsProvider settingsProvider) { _gameServicesMetadata = gameServicesMetadataProvider; _settings = settingsProvider; var values = Enum.GetValues(typeof(TGameServicesKeys)); foreach (object value in values) { var key = (TGameServicesKeys)value; var metadata = _gameServicesMetadata.Resolve(key); _cache[key] = new Achievement <TGameServicesKeys> { GameServiceKey = key, Type = metadata.Type }; } }
public DefaultWebClient(ILog log, ITimeProvider timeProvider, IDataRepository repository, ISettingsProvider settings) { this.log = log; this.timeProvider = timeProvider; this.repository = repository; this.settings = settings; }
public VersionController(ISettingsProvider settingsRepository) { _settingsRepository = settingsRepository; }
public SettingsSnapshotFactory(ISettingsProvider <WhitespaceSetting> data) : base(data) { }
public LateralToLongGExtractor(ISettingsProvider settingsProvider) : base(settingsProvider) { }
/// <summary> /// An attempt to emulate the C# MEF export. /// </summary> /// <param name="name">The settings name</param> /// <param name="provider">The settings provider to register under the provided name</param> public void RegisterSettingProvider(string name, ISettingsProvider provider) { this.SettingProviders[name] = new SettingProviderContext(provider); }
public StateManager(IOpLogManager opLogManager, ISettingsProvider settingsProvider, ILog log) { _opLogManager = opLogManager; _settingsProvider = settingsProvider; _log = log; }
public ProxyProvider(ISettingsProvider settingsProvider) { _log = LogFactory.GetLog(GetType()); _proxies = new List <Proxy>(32); _settingsProvider = settingsProvider; }
private static void SetUpDefaultPermissions(ISettingsProvider SettingsProvider) { // TODO: Is this the best way to go about this? }
/// <summary> /// Initializes a new instance of the <see cref="LogRecordUrlCreator"/> class. /// </summary> /// <param name="settings">The application settings.</param> public LogRecordUrlCreator(ISettingsProvider settings) { _settings = settings; }
public RegisteredPackageSourceSettings(ISettingsProvider settingsProvider) : this(settingsProvider, RegisteredPackageSources.DefaultPackageSource) { }
/// <summary> /// Initializes a new instance of the <see cref="JsonPhraseProvider"/> class. /// </summary> /// <param name="settingsProvider">The settingsProvider<see cref="ISettingsProvider"/></param> public JsonPhraseProvider(ISettingsProvider settingsProvider) { this.gameSettings = settingsProvider.GetSettings(); }
public MeterRelatedElementRepository([Import] ISettingsProvider settingsContainer, [Import] Func <DomainModelContext> createMethod) { m_CreateMethod = createMethod; settingsContainer.ConnectionStringUpdated += (s, e) => Initialize(); Initialize(); }
public GoogleRoutesQueryProvider(ISettingsProvider settingsProvider) { this.settingsProvider = settingsProvider; }
public PdfDirectConversion(IPdfProcessor pdfProcessor, ISettingsProvider settingsProvider, IJobInfoManager jobInfoManager) : base(settingsProvider, jobInfoManager) { _pdfProcessor = pdfProcessor; }
public SpeedToRpmScatterPlotExtractor(ISettingsProvider settingsProvider, IEnumerable <ITelemetryFilter> filters, IGearTelemetryFilter gearTelemetryFilter) : base(settingsProvider, filters, gearTelemetryFilter) { }
public ModuleController(Lazy <ShellService> shellService, IEnvironmentService environmentService, ISettingsProvider settingsProvider, FileController fileController, WorkspaceController workspaceController, IFileService fileService, Lazy <ShellViewModel> shellViewModel, ExportFactory <CodeEditorViewModel> codeEditorViewModelFactory, ExportFactory <InfoViewModel> infoViewModelFactory) { this.shellService = shellService; this.environmentService = environmentService; this.settingsProvider = settingsProvider; this.fileController = fileController; this.workspaceController = workspaceController; this.shellViewModel = shellViewModel; this.codeEditorViewModelFactory = codeEditorViewModelFactory; this.infoViewModelFactory = infoViewModelFactory; this.infoCommand = new DelegateCommand(ShowInfo); this.documentDataModels = new SynchronizingCollection <DocumentDataModel, DocumentFile>(fileService.DocumentFiles, CreateDocumentDataModel); }
public LateralAccelerationToRideHeightExtractor(ISettingsProvider settingsProvider, IEnumerable <ITelemetryFilter> filters) : base(settingsProvider, filters) { }
public EmployeeViewModelFactory([Import] IEmployeeRepository employeeRepository, [Import] ICredentialsManager credentialsManager, [Import] ISettingsProvider settingsProvider) { m_EmployeeRepository = employeeRepository; m_CredentialsManager = credentialsManager; m_SettingsProvider = settingsProvider; }
public void OnResetLayout(ISettingsProvider settingsProvider) { }
public ThrottlingHandler(HttpMessageHandler innerHandler, ISettingsProvider settings) : base(innerHandler) { this.delay = settings.WebClientDelay; }