本文整理汇总了C#中ISettingsService类的典型用法代码示例。如果您正苦于以下问题:C# ISettingsService类的具体用法?C# ISettingsService怎么用?C# ISettingsService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISettingsService类属于命名空间,在下文中一共展示了ISettingsService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ControllerSlaveService
public ControllerSlaveService(
ISettingsService settingsService,
ISchedulerService scheduler,
IDateTimeService dateTimeService,
IOutdoorTemperatureService outdoorTemperatureService,
IOutdoorHumidityService outdoorHumidityService,
IDaylightService daylightService,
IWeatherService weatherService)
{
if (settingsService == null) throw new ArgumentNullException(nameof(settingsService));
if (scheduler == null) throw new ArgumentNullException(nameof(scheduler));
if (dateTimeService == null) throw new ArgumentNullException(nameof(dateTimeService));
if (outdoorTemperatureService == null) throw new ArgumentNullException(nameof(outdoorTemperatureService));
if (outdoorHumidityService == null) throw new ArgumentNullException(nameof(outdoorHumidityService));
if (daylightService == null) throw new ArgumentNullException(nameof(daylightService));
if (weatherService == null) throw new ArgumentNullException(nameof(weatherService));
_dateTimeService = dateTimeService;
_outdoorTemperatureService = outdoorTemperatureService;
_outdoorHumidityService = outdoorHumidityService;
_daylightService = daylightService;
_weatherService = weatherService;
settingsService.CreateSettingsMonitor<ControllerSlaveServiceSettings>(s => Settings = s);
scheduler.RegisterSchedule("ControllerSlavePolling", TimeSpan.FromMinutes(5), PullValues);
}
示例2: TimelineEditor
public TimelineEditor(
IControlHostService controlHostService,
ICommandService commandService,
IContextRegistry contextRegistry,
IDocumentRegistry documentRegistry,
IDocumentService documentService,
IPaletteService paletteService,
ISettingsService settingsService)
{
s_schemaLoader = new SchemaLoader();
s_repository.DocumentAdded += repository_DocumentAdded;
s_repository.DocumentRemoved += repository_DocumentRemoved;
paletteService.AddItem(Schema.markerType.Type, "Timelines", this);
paletteService.AddItem(Schema.groupType.Type, "Timelines", this);
paletteService.AddItem(Schema.trackType.Type, "Timelines", this);
paletteService.AddItem(Schema.intervalType.Type, "Timelines", this);
paletteService.AddItem(Schema.keyType.Type, "Timelines", this);
paletteService.AddItem(Schema.timelineRefType.Type, "Timelines", this);
m_contextRegistry = contextRegistry;
m_documentRegistry = documentRegistry;
m_controlHostService = controlHostService;
m_documentService = documentService;
m_settingsService = settingsService;
}
示例3: PluginsController
/// <summary>
/// Initializes a new instance of the <see cref="PluginsController" /> class.
/// </summary>
/// <param name="fileSystem">The file system.</param>
/// <param name="pluginsService">The plugins service.</param>
/// <param name="nugetService">The nuget service.</param>
/// <param name="visualStudioService">The visual studio service.</param>
/// <param name="readMeService">The read me service.</param>
/// <param name="settingsService">The settings service.</param>
/// <param name="messageBoxService">The message box service.</param>
/// <param name="dialogService">The dialog service.</param>
/// <param name="formsService">The forms service.</param>
/// <param name="translator">The translator.</param>
public PluginsController(
IFileSystem fileSystem,
IPluginsService pluginsService,
INugetService nugetService,
IVisualStudioService visualStudioService,
IReadMeService readMeService,
ISettingsService settingsService,
IMessageBoxService messageBoxService,
IDialogService dialogService,
IFormsService formsService,
ITranslator<Tuple<DirectoryInfoBase, DirectoryInfoBase>, Plugins> translator)
: base(visualStudioService,
readMeService,
settingsService,
messageBoxService,
dialogService,
formsService)
{
TraceService.WriteLine("PluginsController::Constructor");
this.fileSystem = fileSystem;
this.pluginsService = pluginsService;
this.nugetService = nugetService;
this.translator = translator;
}
示例4: MainViewModel
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
/// <param name="windowService">
/// The window service
/// </param>
/// <param name="addinService">
/// The add-in service
/// </param>
/// <param name="settingsService">
/// The settings service
/// </param>
public MainViewModel(IWindowService windowService, IAddinService addinService, ISettingsService settingsService)
{
this.windowService = windowService;
var projects = settingsService.GetProjects();
var projectModel = projects.FirstOrDefault();
var tt = addinService.TaskTrackers.First();
var qs = tt.GenerateQuerySettings();
if (!projects.Any())
{
projectModel = new ProjectModel("Demo project", tt.Id);
var ss = new SecureString();
ss.AppendChar('H');
ss.AppendChar('e');
ss.AppendChar('l');
ss.AppendChar('l');
ss.AppendChar('o');
var testSettings = new Dictionary<string, SecureString>
{
{ "SomeKey1", ss },
{ "SomeKey2", ss }
};
var projectSettings1 = new SettingsModel(projectModel.InternalUrn, testSettings);
settingsService.SaveProject(projectModel, projectSettings1);
}
var projectSettings2 = settingsService.GetProjectSettings(projectModel);
this.Tasks = new ObservableCollection<ITaskModel>(tt.GetAssignedToUser(projectModel, projectSettings2));
settingsService.SaveProject(projectModel);
}
示例5: StatsController
public StatsController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService,
ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, ITopicService topicService, IPostService postService)
: base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService)
{
_topicService = topicService;
_postService = postService;
}
示例6: Initialize
protected override void Initialize(Frame rootFrame, Dictionary<string, Type> views, Dictionary<string, Type> dialogs)
{
base.Initialize(rootFrame, views, dialogs);
_storageService = new StorageService(FileSystem.Current.LocalStorage.Path);
_settingsService = new SettingsService();
_collectionStorageService = new SqliteCollectionStorageService(new SQLitePlatformWinRT());
RegisterInstance<INavigationService>(new NavigationService(rootFrame,views));
RegisterInstance<IEmailService>(new EmailService());
RegisterInstance<IResourceService>(new ResourceService());
RegisterInstance<IEmailService>(new EmailService());
//RegisterInstance<IInstallVoiceSynthesisService>(new InstallVoiceSynthesisService());
RegisterInstance<IScreenService>(new ScreenService());
RegisterInstance<IFontService>(new FontService());
RegisterInstance<IMediaService>(new MediaService());
RegisterInstance<IPopupService>(new PopupService());
RegisterInstance<ICopyPasteService>(new CopyPasteService());
RegisterInstance<ITextToSpeechService>(new TextToSpeechService());
RegisterInstance<IStorageService>(_storageService);
RegisterInstance<ISettingsService>(_settingsService);
RegisterInstance<IXmlService>(new XmlService());
RegisterInstance<ICollectionStorageService>(_collectionStorageService);
InitializeAsync();
}
示例7: OptionsPresenter
/// <summary>
/// Initializes a new instance of the <see cref="OptionsPresenter" /> class.
/// </summary>
/// <param name="view">The view.</param>
/// <param name="settingsService">The settings service.</param>
public OptionsPresenter(
IOptionsView view,
ISettingsService settingsService)
{
this.view = view;
this.settingsService = settingsService;
}
示例8: SnippetsController
public SnippetsController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService,
ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService,
IMembershipUserPointsService membershipUserPointsService, ICacheService cacheService)
: base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService, cacheService)
{
_membershipUserPointsService = membershipUserPointsService;
}
示例9: SettingsViewModel
public SettingsViewModel(ISettingsService settingsService, IWindowManager windowManager, Func<BlogSettingsViewModel> blogSettingsCreator)
{
this.settingsService = settingsService;
this.windowManager = windowManager;
this.blogSettingsCreator = blogSettingsCreator;
using (RegistryKey key = Registry.CurrentUser.OpenSubKey("Software").OpenSubKey("Classes"))
{
FileMDBinding = key.GetSubKeyNames().Contains(Constants.DefaultExtensions[0]) &&
!string.IsNullOrEmpty(key.OpenSubKey(Constants.DefaultExtensions[0]).GetValue("").ToString());
FileMarkdownBinding = key.GetSubKeyNames().Contains(Constants.DefaultExtensions[1]) &&
!string.IsNullOrEmpty(key.OpenSubKey(Constants.DefaultExtensions[1]).GetValue("").ToString());
FileMDownBinding = key.GetSubKeyNames().Contains(Constants.DefaultExtensions[2]) &&
!string.IsNullOrEmpty(key.OpenSubKey(Constants.DefaultExtensions[2]).GetValue("").ToString());
FileMKDBinding = key.GetSubKeyNames().Contains(Constants.DefaultExtensions[3]) &&
!string.IsNullOrEmpty(key.OpenSubKey(Constants.DefaultExtensions[3]).GetValue("").ToString());
}
var blogs = settingsService.Get<List<BlogSetting>>("Blogs") ?? new List<BlogSetting>();
Blogs = new ObservableCollection<BlogSetting>(blogs);
}
示例10: ShellForm
public ShellForm(IKernel kernel)
{
Asserter.AssertIsNotNull(kernel, "kernel");
_kernel = kernel;
_applicationService = _kernel.Get<IApplicationService>();
_storageService = _kernel.Get<IStorageService>();
_settingsService = _kernel.Get<ISettingsService>();
_siteService = _kernel.Get<ISiteService>();
_controller = _kernel.Get<ShellController>();
Asserter.AssertIsNotNull(_applicationService, "_applicationService");
Asserter.AssertIsNotNull(_storageService, "_storageService");
Asserter.AssertIsNotNull(_settingsService, "_settingsService");
Asserter.AssertIsNotNull(_siteService, "_siteService");
InitializeComponent();
_siteService.Register(SiteNames.ContentSite, contentPanel);
_siteService.Register(SiteNames.NavigationSite, navigationPanel);
_siteService.Register(SiteNames.ContentActionsSite, contentActionPanel);
SetStyle(ControlStyles.OptimizedDoubleBuffer |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.ResizeRedraw, true);
}
示例11: Window
public Window(ComponentId id, ISettingsService settingsService)
: base(id)
{
if (settingsService == null) throw new ArgumentNullException(nameof(settingsService));
settingsService.CreateSettingsMonitor<ComponentSettings>(Id, s => Settings = s);
}
示例12: SabNzbdController
public SabNzbdController(ISettingsService<SabNzbdSettingsDto> settingsService, IThirdPartyService api, ILogger logger)
{
SettingsService = settingsService;
Api = api;
Logger = logger;
Settings = SettingsService.GetSettings();
}
示例13: AreaService
public AreaService(
IComponentService componentService,
IAutomationService automationService,
ISystemEventsService systemEventsService,
ISystemInformationService systemInformationService,
IApiService apiService,
ISettingsService settingsService)
{
if (componentService == null) throw new ArgumentNullException(nameof(componentService));
if (automationService == null) throw new ArgumentNullException(nameof(automationService));
if (systemEventsService == null) throw new ArgumentNullException(nameof(systemEventsService));
if (systemInformationService == null) throw new ArgumentNullException(nameof(systemInformationService));
if (apiService == null) throw new ArgumentNullException(nameof(apiService));
if (settingsService == null) throw new ArgumentNullException(nameof(settingsService));
_componentService = componentService;
_automationService = automationService;
_apiService = apiService;
_settingsService = settingsService;
systemEventsService.StartupCompleted += (s, e) =>
{
systemInformationService.Set("Areas/Count", _areas.GetAll().Count);
};
apiService.ConfigurationRequested += HandleApiConfigurationRequest;
}
示例14: ChocolateyLibDirHelper
public ChocolateyLibDirHelper(IChocolateyService chocolateyService, IFileStorageService fileStorageService, ISettingsService settingsService)
{
_chocolateyService = chocolateyService;
_fileStorageService = fileStorageService;
_settingsService = settingsService;
_chocolateyService.OutputChanged += VersionChangeFinished;
}
示例15: ProjectTemplateTranslator
/// <summary>
/// Initializes a new instance of the <see cref="ProjectTemplateTranslator" /> class.
/// </summary>
/// <param name="settingsService">The settings service.</param>
/// <param name="visualStudioService">The visual studio service.</param>
public ProjectTemplateTranslator(
ISettingsService settingsService,
IVisualStudioService visualStudioService)
{
this.settingsService = settingsService;
this.visualStudioService = visualStudioService;
}