public UaBrowserViewModel(Microsoft.VisualStudio.Shell.SVsServiceProvider vsServiceProvider) { this.cts = new CancellationTokenSource(); this.@lock = new SemaphoreSlim(1); // describe self. this.localDescription = new ApplicationDescription() { ApplicationName = "Workstation.UaBrowser", ApplicationUri = $"urn:{System.Net.Dns.GetHostName()}:Workstation.UaBrowser", ApplicationType = ApplicationType.Client }; this.BrowseStopCommand = new DelegateCommand(this.BrowseStop); this.SaveSettingsCommand = new DelegateCommand(this.SaveSettings); this.ResetSettingsCommand = new DelegateCommand(this.ResetSettings); this.NamespaceItems = new ObservableCollection <ReferenceDescriptionViewModel>(); this.ide = (EnvDTE.DTE)vsServiceProvider.GetService(typeof(EnvDTE.DTE)); var shellSettingsManager = new ShellSettingsManager(vsServiceProvider); this.store = shellSettingsManager.GetWritableSettingsStore(SettingsScope.UserSettings); this.LoadSettings(); this.LoadHistory(); this.CertificateStore = new DirectoryStore(Environment.ExpandEnvironmentVariables(@"%LOCALAPPDATA%\Workstation.UaBrowser\pki")); }
public CSharpInheritanceAnalyzer(ITextBuffer textBuffer, TaskScheduler taskScheduler, ITextDocumentFactoryService textDocumentFactoryService, IOutputWindowService outputWindowService, SVsServiceProvider serviceProvider, IInheritanceTagFactory tagFactory) : base(textBuffer, taskScheduler, textDocumentFactoryService, outputWindowService) { if (serviceProvider == null) { throw new ArgumentNullException("serviceProvider"); } _serviceProvider = serviceProvider; _tagFactory = tagFactory; }
public MarkdownLanguageInfo(SVsServiceProvider serviceProvider) { _serviceProvider = serviceProvider; IVsTextManager2 textManager = (IVsTextManager2)serviceProvider.GetService(typeof(SVsTextManager)); LANGPREFERENCES2[] preferences = new LANGPREFERENCES2[1]; preferences[0].guidLang = typeof(MarkdownLanguageInfo).GUID; ErrorHandler.ThrowOnFailure(textManager.GetUserPreferences2(null, null, preferences, null)); _languagePreferences = CreateLanguagePreferences(preferences[0]); _languagePreferencesCookie = ((IConnectionPointContainer)textManager).Advise<LanguagePreferences, IVsTextManagerEvents2>(_languagePreferences); }
public PackageInstallerService( VisualStudioWorkspaceImpl workspace, SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService editorAdaptersFactoryService) : base(workspace, SymbolSearchOptions.Enabled, SymbolSearchOptions.SuggestForTypesInReferenceAssemblies, SymbolSearchOptions.SuggestForTypesInNuGetPackages) { _workspace = workspace; _serviceProvider = serviceProvider; _editorAdaptersFactoryService = editorAdaptersFactoryService; }
public MarkdownLanguageInfo(SVsServiceProvider serviceProvider) { _serviceProvider = serviceProvider; IVsTextManager2 textManager = (IVsTextManager2)serviceProvider.GetService(typeof(SVsTextManager)); LANGPREFERENCES2[] preferences = new LANGPREFERENCES2[1]; preferences[0].guidLang = typeof(MarkdownLanguageInfo).GUID; ErrorHandler.ThrowOnFailure(textManager.GetUserPreferences2(null, null, preferences, null)); _languagePreferences = CreateLanguagePreferences(preferences[0]); _languagePreferencesCookie = ((IConnectionPointContainer)textManager).Advise <LanguagePreferences, IVsTextManagerEvents2>(_languagePreferences); }
public VsContainedLanguageComponentsFactory( IUnconfiguredProjectCommonServices commonServices, SVsServiceProvider serviceProvider, IUnconfiguredProjectVsServices projectServices, IProjectHostProvider projectHostProvider, ILanguageServiceHost languageServiceHost) : base(commonServices.ThreadingService.JoinableTaskContext) { _serviceProvider = serviceProvider; _projectVsServices = projectServices; _projectHostProvider = projectHostProvider; _languageServiceHost = languageServiceHost; }
public StartupProjectRegistrar( SVsServiceProvider serviceProvider, IProjectThreadingService threadingService, IActiveConfiguredProjectSubscriptionService activeConfiguredProjectSubscriptionService, ActiveConfiguredProject <DebuggerLaunchProviders> launchProviders) { Requires.NotNull(serviceProvider, nameof(serviceProvider)); Requires.NotNull(threadingService, nameof(threadingService)); Requires.NotNull(activeConfiguredProjectSubscriptionService, nameof(activeConfiguredProjectSubscriptionService)); Requires.NotNull(launchProviders, nameof(launchProviders)); _serviceProvider = serviceProvider; _threadingService = threadingService; _activeConfiguredProjectSubscriptionService = activeConfiguredProjectSubscriptionService; _launchProviders = launchProviders; WrapperMethodCaller = new DataFlowExtensionMethodCaller(new DataFlowExtensionMethodWrapper()); }
public PackageInstallerService( IThreadingContext threadingContext, VisualStudioWorkspaceImpl workspace, SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, [Import(AllowDefault = true)] Lazy <IVsPackageInstallerServices> packageInstallerServices, [Import(AllowDefault = true)] Lazy <IVsPackageInstaller2> packageInstaller, [Import(AllowDefault = true)] Lazy <IVsPackageUninstaller> packageUninstaller, [Import(AllowDefault = true)] Lazy <IVsPackageSourceProvider> packageSourceProvider) : base(threadingContext, workspace, SymbolSearchOptions.Enabled, SymbolSearchOptions.SuggestForTypesInReferenceAssemblies, SymbolSearchOptions.SuggestForTypesInNuGetPackages) { _workspace = workspace; _serviceProvider = serviceProvider; _editorAdaptersFactoryService = editorAdaptersFactoryService; _packageInstallerServices = packageInstallerServices; _packageInstaller = packageInstaller; _packageUninstaller = packageUninstaller; _packageSourceProvider = packageSourceProvider; }
public JavaLanguageInfo(SVsServiceProvider serviceProvider) : base(serviceProvider, typeof(JavaLanguageInfo).GUID) { }
public CatchSettingsService(Microsoft.VisualStudio.Shell.SVsServiceProvider serviceProvider) { this.dte = (DTE)serviceProvider.GetService(typeof(DTE)); }
public JavaLanguageInfo(SVsServiceProvider serviceProvider) : base(serviceProvider, typeof(JavaLanguageInfo).GUID) { }