当前位置: 首页>>代码示例>>C#>>正文


C# ISettingsProvider.GetSettings方法代码示例

本文整理汇总了C#中ISettingsProvider.GetSettings方法的典型用法代码示例。如果您正苦于以下问题:C# ISettingsProvider.GetSettings方法的具体用法?C# ISettingsProvider.GetSettings怎么用?C# ISettingsProvider.GetSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ISettingsProvider的用法示例。


在下文中一共展示了ISettingsProvider.GetSettings方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ProjectSyncConfiguration

 public ProjectSyncConfiguration(ISettingsProvider provider)
 {
     var ignored = provider.GetSettings("IgnoreDirectories");
     IgnoredDirectories = string.IsNullOrEmpty(ignored)
         ? new string[] {}
         : ignored.Split(',').Select(x => x.Trim()).ToArray();
 }
开发者ID:stormleoxia,项目名称:lx,代码行数:7,代码来源:ProjectSyncConfiguration.cs

示例2: PreferencesViewModel

        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);
        }
开发者ID:bihai,项目名称:carnac,代码行数:30,代码来源:PreferencesViewModel.cs

示例3: CommentsController

        public CommentsController(ICommentRepository commentRepository, ISettingsProvider settingsProvider)
        {
            _commentRepository = commentRepository;
            _settingsProvider = settingsProvider;

            PageSize = _settingsProvider.GetSettings().PageSize;
        }
开发者ID:OrenTiger,项目名称:my-personal-blog,代码行数:7,代码来源:CommentsController.cs

示例4: TagsController

        public TagsController(ITagRepository tagRepository, ISettingsProvider settingsProvider)
        {
            _tagRepository = tagRepository;
            _settingsProvider = settingsProvider;

            PageSize = _settingsProvider.GetSettings().PageSize;
        }
开发者ID:OrenTiger,项目名称:my-personal-blog,代码行数:7,代码来源:TagsController.cs

示例5: PostsController

        public PostsController(IPostRepository postRepository, ITagRepository tagRepository, ISettingsProvider settingsProvider)
        {
            _postRepository = postRepository;
            _tagRepository = tagRepository;
            _settingsProvider = settingsProvider;

            PageSize = _settingsProvider.GetSettings().PageSize;
        }
开发者ID:OrenTiger,项目名称:my-personal-blog,代码行数:8,代码来源:PostsController.cs

示例6: FileRepository

 public FileRepository(ISettingsProvider settingsProvider, HttpServerUtilityBase server)
 {
     root = settingsProvider.GetSettings<Settings.FunnelWebSettings>().UploadPath;
     // If it's a virtual path then we can map it, otherwise we'll expect that it's a windows path
     if (root.StartsWith("~"))
     {
         root = server.MapPath(root);
     }
 }
开发者ID:HarryMcCarney,项目名称:Fungle-web,代码行数:9,代码来源:FileRepository.cs

示例7: ServiceControlConnectionViewModel

 public ServiceControlConnectionViewModel(
     ISettingsProvider settingsProvider,
     IContainer container)
 {
     this.settingsProvider = settingsProvider;
     this.container = container;
     appSettings = settingsProvider.GetSettings<ProfilerSettings>();
     DisplayName = "Connect To ServiceControl";
 }
开发者ID:AlexRhees,项目名称:ServiceInsight,代码行数:9,代码来源:ServiceControlConnectionViewModel.cs

示例8: AppLicenseManager

 public AppLicenseManager(
     ISettingsProvider settingsProvider, 
     ICryptoService cryptoService)
 {
     _settingsProvider = settingsProvider;
     _cryptoService = cryptoService;
     _licenseSettings = settingsProvider.GetSettings<LicenseSettings>();
     Initialize();
 }
开发者ID:roycornelissen,项目名称:ServiceInsight,代码行数:9,代码来源:AppLicenseManager.cs

示例9: ManagementConnectionViewModel

 public ManagementConnectionViewModel(
     ISettingsProvider settingsProvider,
     IContainer container)
 {
     _settingsProvider = settingsProvider;
     _container = container;
     _appSettings = settingsProvider.GetSettings<ProfilerSettings>();
     DisplayName = "Connect To Management Service";
 }
开发者ID:roycornelissen,项目名称:ServiceInsight,代码行数:9,代码来源:ManagementConnectionViewModel.cs

示例10: TestInitialize

 public void TestInitialize()
 {
     shell = Substitute.For<ShellViewModel>();
     serviceControl = Substitute.For<IServiceControl>();
     settingsProvider = Substitute.For<ISettingsProvider>();
     connection = Substitute.For<ServiceControlConnectionProvider>();
     container = RegisterContainer();
     storedSetting = GetReloadedSettings();
     settingsProvider.GetSettings<ProfilerSettings>().Returns(storedSetting);
     connectTo = new ServiceControlConnectionViewModel(settingsProvider, container) { Parent = shell }; //TODO: Do we need to pass the full container here?
 }
开发者ID:Particular,项目名称:ServiceInsight,代码行数:11,代码来源:ServiceControlConnectionDialogTests.cs

示例11: MetaWeblog

 public MetaWeblog(
     ISettingsProvider settingsProvider,
     IRepository repository,
     ISession session,
     IFileRepository fileRepository,
     IAuthenticator authenticator)
 {
     this.repository = repository;
     this.session = session;
     this.fileRepository = fileRepository;
     this.authenticator = authenticator;
     funnelWebSettings = settingsProvider.GetSettings<FunnelWebSettings>();
 }
开发者ID:noopman,项目名称:FunnelWeb,代码行数:13,代码来源:MetaWeblog.cs

示例12: OnResetLayout

        public void OnResetLayout(ISettingsProvider settingsProvider)
        {
            var layoutSettings = settingsProvider.GetSettings<ShellLayoutSettings>();

            layoutSettings.ResetLayout = true;
            layoutSettings.MenuLayout = null;
            layoutSettings.DockLayout = null;
            layoutSettings.MainWindowState = WindowState.Maximized;
            layoutSettings.MainWindowTop = SystemParameters.VirtualScreenTop;
            layoutSettings.MainWindowLeft = SystemParameters.VirtualScreenLeft;
            layoutSettings.MainWindowWidth = SystemParameters.VirtualScreenWidth;
            layoutSettings.MainWindowHeight = SystemParameters.VirtualScreenHeight;

            settingsProvider.SaveSettings(layoutSettings);
        }
开发者ID:NicoVermeir,项目名称:ServiceInsight,代码行数:15,代码来源:Shell.xaml.cs

示例13: OnRestoreLayout

        public void OnRestoreLayout(ISettingsProvider settingsProvider)
        {
            var settings = settingsProvider.GetSettings<ExceptionViewSettings>();

            Height = settings.Height;
            Width = settings.Width;

            if (settings.WindowState == WindowState.Normal)
            {
                Left = settings.Left;
                Top = settings.Top;
            }

            WindowState = settings.WindowState;
        }
开发者ID:AlexRhees,项目名称:ServiceInsight,代码行数:15,代码来源:ExceptionDetailView.xaml.cs

示例14: OnRestoreLayout

        public void OnRestoreLayout(ISettingsProvider settingsProvider)
        {
            var layoutSetting = settingsProvider.GetSettings<ShellLayoutSettings>();
            var currentLayoutVersion = GetCurrentLayoutVersion();

            if (layoutSetting.LayoutVersion == currentLayoutVersion)
            {
                SetLayout(DockManager, layoutSetting.DockLayout.GetAsStream());
                SetLayout(BarManager, layoutSetting.MenuLayout.GetAsStream());
            }

            Top = layoutSetting.MainWindowTop;
            Left = layoutSetting.MainWindowLeft;
            Width = layoutSetting.MainWindowWidth;
            Height = layoutSetting.MainWindowHeight;
            WindowState = layoutSetting.MainWindowState;
        }
开发者ID:NicoVermeir,项目名称:ServiceInsight,代码行数:17,代码来源:Shell.xaml.cs

示例15: TestInitialize

        public void TestInitialize()
        {
            windowManager = Substitute.For<WindowManagerEx>();
            endpointExplorer = Substitute.For<EndpointExplorerViewModel>();
            messageList = Substitute.For<MessageListViewModel>();
            statusbarManager = Substitute.For<StatusBarManager>();
            eventAggregator = Substitute.For<IEventAggregator>();
            workNotifier = Substitute.For<IWorkNotifier>();
            messageFlow = Substitute.For<MessageFlowViewModel>();
            sagaWindow = Substitute.For<SagaWindowViewModel>();
            messageBodyView = Substitute.For<MessageBodyViewModel>();
            messageProperties = Substitute.For<MessagePropertiesViewModel>();
            view = Substitute.For<IShellViewStub>();
            headerView = Substitute.For<MessageHeadersViewModel>();
            sequenceDiagramView = Substitute.For<SequenceDiagramViewModel>();
            settingsProvider = Substitute.For<ISettingsProvider>();
            licenseManager = Substitute.For<AppLicenseManager>();
            logWindow = Substitute.For<LogWindowViewModel>();
            settingsProvider.GetSettings<ProfilerSettings>().Returns(DefaultAppSetting());
            app = Substitute.For<IAppCommands>();
            commandLineArgParser = MockEmptyStartupOptions();

            shell = new ShellViewModel(
                        app,
                        windowManager,
                        endpointExplorer,
                        messageList,
                        () => Substitute.For<ServiceControlConnectionViewModel>(),
                        () => Substitute.For<LicenseRegistrationViewModel>(),
                        statusbarManager,
                        eventAggregator,
                        workNotifier,
                        licenseManager,
                        messageFlow,
                        sagaWindow,
                        messageBodyView,
                        headerView,
                        sequenceDiagramView,
                        settingsProvider,
                        messageProperties,
                        logWindow,
                        commandLineArgParser);

            ((IViewAware)shell).AttachView(view);
        }
开发者ID:Particular,项目名称:ServiceInsight,代码行数:45,代码来源:ShellViewModelTests.cs


注:本文中的ISettingsProvider.GetSettings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。