本文整理汇总了C#中IConfigurationService类的典型用法代码示例。如果您正苦于以下问题:C# IConfigurationService类的具体用法?C# IConfigurationService怎么用?C# IConfigurationService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IConfigurationService类属于命名空间,在下文中一共展示了IConfigurationService类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: AutoLinkerService
public AutoLinkerService(DTE2 visualStudio, IConfigurationService configurationService, IVisualStudioService visualStudioService)
{
Argument.IsNotNull("visualStudio", visualStudio);
Argument.IsNotNull("configurationService", configurationService);
Argument.IsNotNull("visualStudioService", visualStudioService);
_visualStudio = visualStudio;
_configurationService = configurationService;
_visualStudioService = visualStudioService;
var events = (Events2)_visualStudio.Events;
_solutionEvents = events.SolutionEvents;
_solutionEvents.Opened += OnSolutionOpened;
_solutionEvents.AfterClosing += OnSolutionClosed;
_solutionItemsEvents = events.MiscFilesEvents;
_solutionItemsEvents.ItemAdded += OnSolutionItemAdded;
_solutionItemsEvents.ItemRemoved += OnSolutionItemRemoved;
_solutionItemsEvents.ItemRenamed += OnSolutionItemRenamed;
_projectItemsEvents = events.ProjectItemsEvents;
_projectItemsEvents.ItemAdded += OnSolutionItemAdded;
_projectItemsEvents.ItemRemoved += OnSolutionItemRemoved;
_projectItemsEvents.ItemRenamed += OnSolutionItemRenamed;
}
开发者ID:GeertvanHorrik,项目名称:Caitlyn,代码行数:26,代码来源:AutoLinkerService.cs
示例2: MainViewModel
public MainViewModel(IConfigurationService configService, INuiService nuiService, IKeyboardService keyboardService)
{
this.keyboardService = keyboardService;
this.keyboardService.KeyUp += new EventHandler<KeyEventArgs>(keyboardService_KeyUp);
this.configService = configService;
this.nuiService = nuiService;
this.nuiService.UserRaisedHand += new EventHandler<HandRaisedEventArgs>(nuiService_UserRaisedHand);
this.nuiService.UserEnteredBounds += new EventHandler(nuiService_UserEnteredBounds);
this.nuiService.UserExitedBounds += new EventHandler(nuiService_UserExitedBounds);
this.ToggleCommand = new RelayCommand(this.ExecuteToggleCommand);
this.AutoPlayCommand = new RelayCommand(this.ExecuteAutoPlayCommand);
this.ToggleKinectVisionCommand = new RelayCommand(this.ExecuteToggleKinectVisionCommand);
this.MainBackgroundBrush = (Brush)Application.Current.Resources["DefaultBackground"];
this.EngineeringBackgroundBrush = new SolidColorBrush(Color.FromArgb(255, 0, 49, 83));
this.videoTimer = new DispatcherTimer();
this.videoTimer.Interval = TimeSpan.FromMilliseconds(50);
this.videoTimer.Tick += new EventHandler(videoTimer_Tick);
this.videoTimer.Start();
if (!IsInDesignMode)
{
Application.Current.MainWindow.SizeChanged += new SizeChangedEventHandler(MainWindow_SizeChanged);
}
}
开发者ID:kindohm,项目名称:getstem-kinect-3d,代码行数:25,代码来源:MainViewModel.cs
示例3: Setup
public void Setup()
{
repository = new MockRepository();
sc = new ServiceContainer();
arch = new IntelArchitecture(ProcessorMode.Protected32);
dcSvc = repository.StrictMock<IConfigurationService>();
}
开发者ID:gitter-badger,项目名称:reko,代码行数:7,代码来源:Win32PlatformTests.cs
示例4: WidgetController
public WidgetController(ILog logger, IConfigurationService configurationService, IPostService postService, ICategoryService categoryService, IPageService pageService)
: base(logger, configurationService)
{
this.postService = postService;
this.categoryService = categoryService;
this.pageService = pageService;
}
开发者ID:prabhakara,项目名称:Dexter-Blog-Engine,代码行数:7,代码来源:WidgetController.cs
示例5: Setup
public void Setup()
{
mr = new MockRepository();
dcSvc = mr.Stub<IConfigurationService>();
sc = new ServiceContainer();
sc.AddService(typeof(IConfigurationService), dcSvc);
}
开发者ID:gitter-badger,项目名称:reko,代码行数:7,代码来源:OpenAsInteractorTests.cs
示例6: DirectoryConnectionConfig
public DirectoryConnectionConfig(IConfigurationService configService)
{
this.ServerName = configService.GetSetting<string>("adLds:serverName", string.Empty);
this.Port = configService.GetSetting<string>("adLds:port", string.Empty);
this.Prefix = configService.GetSetting<string>("adLds:prefix", string.Empty);
this.Container = configService.GetSetting<string>("adLds:container", string.Empty);
}
开发者ID:ianlovell,项目名称:openidconnect,代码行数:7,代码来源:DirectoryConnectionConfig.cs
示例7: StationConnectionChecker
public StationConnectionChecker(IStationFeedService stationFeedService,
IConfigurationService configurationService)
{
ConfigurationService = configurationService;
stationCollection = stationFeedService.CachedStations;
stationCollection.CollectionChanged += StationCollection_OnCollectionChanged;
}
开发者ID:naeemkhedarun,项目名称:ShoutcastBrowser,代码行数:7,代码来源:StationConnectionChecker.cs
示例8: FileWatcherConfigurationService
public FileWatcherConfigurationService(IConfigurationService decoratedService, IFileWatcher fileWatcher)
{
this.decoratedService = decoratedService;
this.fileWatcher = fileWatcher;
this.fileWatcher.OnFileChanged += new FileSystemEventHandler(HandleConfigurationFileChanged);
decoratedService.AddConfigurationSubfileLoadedHandler( SubfileLoaded );
}
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:7,代码来源:FileWatcherConfigurationService.cs
示例9: Setup
public void Setup()
{
this.mr = new MockRepository();
this.sc = new ServiceContainer();
loader = mr.Stub<ILoader>();
arch = mr.StrictMock<IProcessorArchitecture>();
Address dummy;
arch.Stub(a => a.TryParseAddress(null, out dummy)).IgnoreArguments().WhenCalled(m =>
{
Address addr;
var sAddr = (string)m.Arguments[0];
var iColon = sAddr.IndexOf(':');
if (iColon > 0)
{
addr = Address.SegPtr(
Convert.ToUInt16(sAddr.Remove(iColon)),
Convert.ToUInt16(sAddr.Substring(iColon+1)));
m.ReturnValue = true;
}
else
{
m.ReturnValue = Address32.TryParse32((string)m.Arguments[0], out addr);
}
m.Arguments[1] = addr;
}).Return(false);
this.cfgSvc = mr.Stub<IConfigurationService>();
this.sc.AddService<IConfigurationService>(cfgSvc);
}
开发者ID:relaxar,项目名称:reko,代码行数:28,代码来源:ProjectSerializerTests.cs
示例10: NewsController
public NewsController(IRssParserService rssParserService, INewsService newsService, IConfigurationService configurationService)
: base(configurationService)
{
_rssParserService = rssParserService;
_newsService = newsService;
_useRssDataSource = configurationService.GetSetting(string.Empty, "NewsDataSource", "Dictionaries", "AppSettings", "General", "News").ToLower() == "rss";
}
开发者ID:evkap,项目名称:MetaPortal,代码行数:7,代码来源:NewsController.cs
示例11: SitesViewModel
public SitesViewModel(ISiteDataService siteDataService, IConfigurationService configurationService)
{
_siteDataService = siteDataService;
_configurationService = configurationService;
_siteDataService.PropertyChanged += (s,e) => {
if (e.PropertyName == "Sites")
{
this.SiteFilter = String.Empty;
this.SelectedSite = this.Sites.FirstOrDefault();
}
};
this.LoadNgrokInspector = new RelayCommand(() => {
Process.Start("http://localhost:4040/");
});
this.RunNgrokCommand = new RelayCommand(() => {
Process p = new Process();
p.StartInfo = new ProcessStartInfo( "cmd.exe" )
{
Arguments = string.Format("/k \"{0}\" http -subdomain={1} {2}", Path.Combine(_configurationService.ApplicationConfiguration.NgrokExecutablePath, "ngrok.exe"), this.SelectedSite.Subdomain, this.SelectedSite.LocalhostPort),
UseShellExecute = true,
WindowStyle = ProcessWindowStyle.Normal
};
p.Start();
});
this.SiteFilter = String.Empty;
}
开发者ID:modulexcite,项目名称:ngrok.editor,代码行数:32,代码来源:SitesViewModel.cs
示例12: WebAutomationViewModel
public WebAutomationViewModel(IManifestService manifestService, ITestCollectionService testCollectionService, IConfigurationService configurationService)
{
_manifestService = manifestService;
_testCollectionService = testCollectionService;
_configurationService = configurationService;
Header = "Web Automation";
ResultsViewModel = App.ServiceLocator.GetInstance<ResultsViewModel>();
Manifests = new ObservableCollection<ManifestViewModel>();
TransitionArea = ResultsViewModel;
LoadInformation();
EditCategoriesCommand = new RelayCommand(EditTestCollections, t => EditTestCollectionViewModel == null);
LoadManifestCommand = new RelayCommand(parameter =>
{
var dialog = new OpenFileDialog
{
Filter = "Manifest File|.manifests.json",
};
var result = dialog.ShowDialog();
if (result == true)
{
_configurationService.TestScriptsPath = Path.GetDirectoryName(dialog.FileName);
_manifestService.ReloadManifest();
LoadInformation();
}
});
}
开发者ID:MGetmanov,项目名称:Selenite,代码行数:33,代码来源:WebAutomationViewModel.cs
示例13: LoginWindowViewModel
public LoginWindowViewModel(ILiveService liveAuthService, IConfigurationService configurationService)
{
if (liveAuthService == null)
throw new ArgumentNullException("liveAuthService");
if (configurationService == null)
throw new ArgumentNullException("configurationService");
_liveAuthService = liveAuthService;
_configurationService = configurationService;
Loaded = new RelayCommand(() =>
{
var loginUrl = _liveAuthService.GetLoginUrl();
this.CurrentPage = new Uri(loginUrl, UriKind.Absolute);
});
Navigated = new RelayCommand<NavigationEventArgs>((args) =>
{
if (args.Uri.AbsoluteUri.StartsWith("https://login.live.com/oauth20_desktop.srf"))
{
var continueProcessing = false;
var parsedQueryParameters = HttpUtility.ParseQueryString(args.Uri.Query);
var authorizationCode = parsedQueryParameters["code"];
if (authorizationCode != null)
{
_liveAuthService.GetTokens(authorizationCode);
continueProcessing = true;
}
Messenger.Default.Send<CloseLoginWindow>(new CloseLoginWindow(continueProcessing));
}
});
}
开发者ID:riverar,项目名称:ExtensionsForOneDrive,代码行数:35,代码来源:LoginWindowViewModel.cs
示例14: RibbonViewModel
public RibbonViewModel(IRegexService regexService, ICommandManager commandManager,
INavigationService navigationService, IConfigurationService configurationService, IUIVisualizerService uiVisualizerService,
IWorkspaceManager workspaceManager, IPleaseWaitService pleaseWaitService, IFilterService filterService)
{
Argument.IsNotNull(() => regexService);
Argument.IsNotNull(() => commandManager);
Argument.IsNotNull(() => navigationService);
Argument.IsNotNull(() => configurationService);
Argument.IsNotNull(() => uiVisualizerService);
Argument.IsNotNull(() => workspaceManager);
Argument.IsNotNull(() => pleaseWaitService);
Argument.IsNotNull(() => filterService);
_regexService = regexService;
Filter = filterService.Filter;
_navigationService = navigationService;
_configurationService = configurationService;
_uiVisualizerService = uiVisualizerService;
_workspaceManager = workspaceManager;
_pleaseWaitService = pleaseWaitService;
_filterService = filterService;
SaveWorkspace = new Command(OnSaveWorkspaceExecute, OnSaveWorkspaceCanExecute);
CreateWorkspace = new Command(OnCreateWorkspaceExecute);
ShowSettings = new Command(OnShowSettingsExecute);
ShowKeyboardMappings = new Command(OnShowKeyboardMappingsExecute);
Exit = new Command(OnExitExecute);
commandManager.RegisterCommand(Commands.Settings.General, ShowSettings, this);
commandManager.RegisterCommand(Commands.File.Exit, Exit, this);
Title = AssemblyHelper.GetEntryAssembly().Title();
}
开发者ID:sk8tz,项目名称:LogViewer,代码行数:35,代码来源:RibbonViewModel.cs
示例15: RegisterUserStore
private static void RegisterUserStore(IConfigurationService configService, ContainerBuilder builder)
{
UserStoreType userStoreType;
Enum.TryParse(configService.GetSetting("IdentityServerUserStore", "None"), out userStoreType);
builder.Register(ctx => userStoreType);
switch (userStoreType)
{
case UserStoreType.AspNetIdentity:
RegisterAspNetIdentity(builder);
break;
case UserStoreType.MembershipReboot:
RegisterMembershipReboot(builder);
break;
case UserStoreType.AdLds:
RegisterAdLds(builder);
break;
case UserStoreType.UsersApi:
RegisterApiServices(configService, builder);
break;
default:
throw new InvalidOperationException("Invalid user store type specified");
}
if (userStoreType != UserStoreType.UsersApi)
{
builder.RegisterType<DomainUserService>().As<IUserService>();
builder.RegisterType<DomainIdentityManagerService>().As<IIdentityManagerService>();
}
}
开发者ID:JGaudion,项目名称:openidconnect,代码行数:30,代码来源:Modules.cs
示例16: PageController
public PageController(ILog logger, IConfigurationService configurationService, IPageService pageService, IUrlBuilder urlBuilder, IRoutingService routingService)
: base(logger, configurationService)
{
this.pageService = pageService;
this.urlBuilder = urlBuilder;
this.routingService = routingService;
}
开发者ID:prabhakara,项目名称:Dexter-Blog-Engine,代码行数:7,代码来源:PageController.cs
示例17: UpdateService
public UpdateService(Logger l, IWebClient c, IConfigurationService cfg, ITrayLockService ls)
{
logger = l;
client = c;
configService = cfg;
lockService = ls;
}
开发者ID:nmrcarroll,项目名称:Jackett,代码行数:7,代码来源:UpdateService.cs
示例18: PostController
public PostController(ILog logger, IConfigurationService configurationService, IPostService postService, ICategoryService categoryService, IUrlBuilder urlBuilder)
: base(logger, configurationService)
{
this.postService = postService;
this.categoryService = categoryService;
this.urlBuilder = urlBuilder;
}
开发者ID:prabhakara,项目名称:Dexter-Blog-Engine,代码行数:7,代码来源:PostController.cs
示例19: AutoDLProfileService
public AutoDLProfileService(IConfigurationService c, ILogger<AutoDLProfileService> l, ILoggerFactory lf)
{
configSerivce = c;
logger = l;
logFactory = lf;
Load();
}
开发者ID:Jackett,项目名称:Jackett2,代码行数:7,代码来源:AutoDLProfileService.cs
示例20: ManifestService
public ManifestService(IConfigurationService configurationService, IFileService fileService)
{
_configurationService = configurationService;
_fileService = fileService;
_manifestCollection = new Lazy<ManifestCollection>(LoadManifestCollection);
}
开发者ID:MGetmanov,项目名称:Selenite,代码行数:7,代码来源:ManifestService.cs
注:本文中的IConfigurationService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论