本文整理汇总了C#中SVsServiceProvider类的典型用法代码示例。如果您正苦于以下问题:C# SVsServiceProvider类的具体用法?C# SVsServiceProvider怎么用?C# SVsServiceProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SVsServiceProvider类属于命名空间,在下文中一共展示了SVsServiceProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VisualStudioMetadataAsSourceFileSupportService
public VisualStudioMetadataAsSourceFileSupportService(SVsServiceProvider serviceProvider, IMetadataAsSourceFileService metadataAsSourceFileService)
{
_metadataAsSourceFileService = metadataAsSourceFileService;
var solution = (IVsSolution)serviceProvider.GetService(typeof(SVsSolution));
ErrorHandler.ThrowOnFailure(solution.AdviseSolutionEvents(this, out _eventCookie));
}
示例2: ReSharperUtil
internal ReSharperUtil(IVim vim, IVimBufferCoordinatorFactory vimBufferCoordinatorFactory, SVsServiceProvider serviceProvider)
{
var vsShell = serviceProvider.GetService<SVsShell, IVsShell>();
_isResharperInstalled = vsShell.IsPackageInstalled(Resharper5Guid);
_vim = vim;
_vimBufferCoordinatorFactory = vimBufferCoordinatorFactory;
}
示例3: VsTextViewListener
public VsTextViewListener(
IVsEditorAdaptersFactoryService editorAdaptersFactory,
SVsServiceProvider serviceProvider)
{
this.editorAdaptersFactory = editorAdaptersFactory;
this.serviceProvider = serviceProvider;
}
示例4: TryCreate
internal static bool TryCreate(SVsServiceProvider vsServiceProvider, out IRoslynRenameUtil roslynRenameUtil)
{
RoslynRenameUtil util;
bool ret = TryCreateCore(vsServiceProvider, out util);
roslynRenameUtil = util;
return ret;
}
示例5: VsVimHost
internal VsVimHost(
IVsAdapter adapter,
ITextBufferFactoryService textBufferFactoryService,
ITextEditorFactoryService textEditorFactoryService,
ITextDocumentFactoryService textDocumentFactoryService,
ITextBufferUndoManagerProvider undoManagerProvider,
IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
IEditorOperationsFactoryService editorOperationsFactoryService,
IWordUtilFactory wordUtilFactory,
ITextManager textManager,
ISharedServiceFactory sharedServiceFactory,
SVsServiceProvider serviceProvider)
: base(textBufferFactoryService, textEditorFactoryService, textDocumentFactoryService, editorOperationsFactoryService)
{
_vsAdapter = adapter;
_editorAdaptersFactoryService = editorAdaptersFactoryService;
_wordUtilFactory = wordUtilFactory;
_dte = (_DTE)serviceProvider.GetService(typeof(_DTE));
_vsExtensibility = (IVsExtensibility)serviceProvider.GetService(typeof(IVsExtensibility));
_textManager = textManager;
_sharedService = sharedServiceFactory.Create();
_vsMonitorSelection = serviceProvider.GetService<SVsShellMonitorSelection, IVsMonitorSelection>();
uint cookie;
_vsMonitorSelection.AdviseSelectionEvents(this, out cookie);
}
示例6: VisualStudioDiagnosticListTable
public VisualStudioDiagnosticListTable(
SVsServiceProvider serviceProvider,
VisualStudioWorkspace workspace,
IDiagnosticService diagnosticService,
ExternalErrorDiagnosticUpdateSource errorSource,
ITableManagerProvider provider) :
this(serviceProvider, (Workspace)workspace, diagnosticService, errorSource, provider)
{
ConnectWorkspaceEvents();
_errorList = serviceProvider.GetService(typeof(SVsErrorList)) as IErrorList;
if (_errorList == null)
{
AddInitialTableSource(workspace.CurrentSolution, _liveTableSource);
return;
}
_errorList.PropertyChanged += OnErrorListPropertyChanged;
AddInitialTableSource(workspace.CurrentSolution, GetCurrentDataSource());
SuppressionStateColumnDefinition.SetDefaultFilter(_errorList.TableControl);
if (ErrorListHasFullSolutionAnalysisButton())
{
SetupErrorListFullSolutionAnalysis(workspace);
}
}
示例7: RegisterSolutionEvents
private void RegisterSolutionEvents(SVsServiceProvider serviceProvider)
{
var dte = serviceProvider.GetService(typeof(SApplicationObject)) as DTE2;
var solutionEvents = dte.Events.SolutionEvents;
solutionEvents.Opened += solutionEvents_Opened;
}
示例8: OptionsProviderFatory
internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider, IVimApplicationSettings vimApplicationSettings, IVimProtectedOperations protectedOperations)
{
_keyBindingService = keyBindingService;
_serviceProvider = provider;
_vimApplicationSettings = vimApplicationSettings;
_protectedOperations = protectedOperations;
}
示例9: DocumentMonitorService
internal DocumentMonitorService(SVsServiceProvider vsServiceProvider, ICompletionBroker completionBroker)
{
_vsServiceProvider = vsServiceProvider;
_runningDocumentTable = new RunningDocumentTable(vsServiceProvider);
_runningDocumentTable.Advise(this);
_completionBroker = completionBroker;
_dte = (DTE)vsServiceProvider.GetService(typeof(_DTE));
// NB: Resharper somehow fucks with this event, we need to do as
// little as possible in the event handler itself
var documentChanged = _changed
.ObserveOn(RxApp.TaskpoolScheduler)
.Throttle(TimeSpan.FromSeconds(2.0), RxApp.TaskpoolScheduler)
.Where(_ => !isCompletionActive())
.Select(_ => Unit.Default)
.ObserveOn(RxApp.MainThreadScheduler);
documentChanged.Subscribe(_ => SaveAll());
// NB: We use the message bus here, because we want to effectively
// merge all of the text change notifications from any document
MessageBus.Current.RegisterMessageSource(documentChanged, "AnyDocumentChanged");
checkAlreadyOpenDocuments(vsServiceProvider);
_dte.Events.WindowEvents.WindowActivated += (o,e) => _changed.OnNext(Unit.Default);
}
示例10: TemplateProvider
public TemplateProvider(SVsServiceProvider vsServiceProvider)
{
//var shellSettingsManager = new ShellSettingsManager(vsServiceProvider);
//writableSettingsStore = shellSettingsManager.GetWritableSettingsStore(SettingsScope.UserSettings);
//LoadTemplates();
}
示例11: CommentTaskTokenSerializer
public CommentTaskTokenSerializer(SVsServiceProvider serviceProvider)
{
var tokenInfo = serviceProvider.GetService(typeof(SVsTaskList)) as IVsCommentTaskInfo;
// The SVsTaskList may not be available (e.g. during "devenv /build")
_taskTokenList = tokenInfo != null ? GetTaskTokenList(tokenInfo) : string.Empty;
}
示例12: MiscellaneousDiagnosticListTable
private MiscellaneousDiagnosticListTable(
SVsServiceProvider serviceProvider, Workspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) :
base(serviceProvider, workspace, diagnosticService, provider)
{
_source = new LiveTableDataSource(serviceProvider, workspace, diagnosticService, IdentifierString);
AddInitialTableSource(workspace.CurrentSolution, _source);
}
示例13: Encouragements
public Encouragements(SVsServiceProvider vsServiceProvider)
{
var shellSettingsManager = new ShellSettingsManager(vsServiceProvider);
writableSettingsStore = shellSettingsManager.GetWritableSettingsStore(SettingsScope.UserSettings);
LoadSettings();
}
示例14: SettingsFileUserNotifier
public SettingsFileUserNotifier(SVsServiceProvider sp, INotificationService notifier, SettingsPersister persister, SettingsLocator locator)
{
this.locator = locator;
this.notifier = notifier;
this.persister = persister;
dte = (DTE)sp.GetService(typeof(DTE));
}
示例15: PowerToolsUtil
internal PowerToolsUtil(SVsServiceProvider serviceProvider)
{
var vsShell = serviceProvider.GetService<SVsShell, IVsShell>();
_isQuickFindInstalled = vsShell.IsPackageInstalled(QuickFindGuid);
_searchModel = new Lazy<object>(GetSearchModel);
_isActivePropertyInfo = new Lazy<PropertyInfo>(GetIsActivePropertyInfo);
}