本文整理汇总了C#中SVsServiceProvider类的典型用法代码示例。如果您正苦于以下问题:C# SVsServiceProvider类的具体用法?C# SVsServiceProvider怎么用?C# SVsServiceProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SVsServiceProvider类属于命名空间,在下文中一共展示了SVsServiceProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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));
}
开发者ID:Rickinio,项目名称:roslyn,代码行数:7,代码来源:VisualStudioMetadataAsSourceFileSupportService.cs
示例2: ReSharperUtil
internal ReSharperUtil(IVim vim, IVimBufferCoordinatorFactory vimBufferCoordinatorFactory, SVsServiceProvider serviceProvider)
{
var vsShell = serviceProvider.GetService<SVsShell, IVsShell>();
_isResharperInstalled = vsShell.IsPackageInstalled(Resharper5Guid);
_vim = vim;
_vimBufferCoordinatorFactory = vimBufferCoordinatorFactory;
}
开发者ID:aesire,项目名称:VsVim,代码行数:7,代码来源:ReSharperUtil.cs
示例3: VsTextViewListener
public VsTextViewListener(
IVsEditorAdaptersFactoryService editorAdaptersFactory,
SVsServiceProvider serviceProvider)
{
this.editorAdaptersFactory = editorAdaptersFactory;
this.serviceProvider = serviceProvider;
}
开发者ID:2j2e,项目名称:presentations,代码行数:7,代码来源:VsTextViewListener.cs
示例4: TryCreate
internal static bool TryCreate(SVsServiceProvider vsServiceProvider, out IRoslynRenameUtil roslynRenameUtil)
{
RoslynRenameUtil util;
bool ret = TryCreateCore(vsServiceProvider, out util);
roslynRenameUtil = util;
return ret;
}
开发者ID:Yzzl,项目名称:VsVim,代码行数:7,代码来源:RoslynRenameUtil.cs
示例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);
}
开发者ID:0-F,项目名称:VsVim,代码行数:26,代码来源:VsVimHost.cs
示例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);
}
}
开发者ID:RoryVL,项目名称:roslyn,代码行数:26,代码来源:VisualStudioDiagnosticListTable.cs
示例7: RegisterSolutionEvents
private void RegisterSolutionEvents(SVsServiceProvider serviceProvider)
{
var dte = serviceProvider.GetService(typeof(SApplicationObject)) as DTE2;
var solutionEvents = dte.Events.SolutionEvents;
solutionEvents.Opened += solutionEvents_Opened;
}
开发者ID:XewTurquish,项目名称:vsminecraft,代码行数:7,代码来源:JavaEditorConnectionListener.cs
示例8: OptionsProviderFatory
internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider, IVimApplicationSettings vimApplicationSettings, IVimProtectedOperations protectedOperations)
{
_keyBindingService = keyBindingService;
_serviceProvider = provider;
_vimApplicationSettings = vimApplicationSettings;
_protectedOperations = protectedOperations;
}
开发者ID:louisfeng,项目名称:VsVim,代码行数:7,代码来源:OptionsProvider.cs
示例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);
}
开发者ID:hmemcpy,项目名称:SaveAllTheTime,代码行数:27,代码来源:DocumentMonitorService.cs
示例10: TemplateProvider
public TemplateProvider(SVsServiceProvider vsServiceProvider)
{
//var shellSettingsManager = new ShellSettingsManager(vsServiceProvider);
//writableSettingsStore = shellSettingsManager.GetWritableSettingsStore(SettingsScope.UserSettings);
//LoadTemplates();
}
开发者ID:mlruzic,项目名称:visual-studio-scaffolding,代码行数:7,代码来源:TemplateProvider.cs
示例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;
}
开发者ID:GloryChou,项目名称:roslyn,代码行数:7,代码来源:CommentTaskTokenSerializer.cs
示例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);
}
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:7,代码来源:MiscellaneousDiagnosticListTable.cs
示例13: Encouragements
public Encouragements(SVsServiceProvider vsServiceProvider)
{
var shellSettingsManager = new ShellSettingsManager(vsServiceProvider);
writableSettingsStore = shellSettingsManager.GetWritableSettingsStore(SettingsScope.UserSettings);
LoadSettings();
}
开发者ID:RC1140,项目名称:Encourage,代码行数:7,代码来源:Encouragments.cs
示例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));
}
开发者ID:yannduran,项目名称:Rebracer,代码行数:7,代码来源:SettingsFileUserNotifier.cs
示例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);
}
开发者ID:honeyhoneywell,项目名称:VsVim,代码行数:7,代码来源:PowerToolsUtil.cs
示例16: ClousotOptions
public ClousotOptions(SVsServiceProvider serviceProvider) {
var shell = (IVsShell)serviceProvider.GetService(typeof(SVsShell));
IVsPackage package;
Marshal.ThrowExceptionForHR(shell.LoadPackage(Microsoft.Research.AskCodeContracts.Guids.guidOptionsPagePackagePkg, out package));
this.page = ((OptionsPagePackage)package).GetOptionsPage();
}
开发者ID:asvishnyakov,项目名称:CodeContracts,代码行数:7,代码来源:ClousotOptions.cs
示例17: TemplateCompletionHandlerProvider
public TemplateCompletionHandlerProvider(
ITemplateEditorOptions options,
IVsEditorAdaptersFactoryService editorAdapterFactory,
SVsServiceProvider serviceProvider,
ICompletionBroker completionBroker)
{
if (options == null)
{
throw new ArgumentNullException(nameof(options));
}
if (editorAdapterFactory == null)
{
throw new ArgumentNullException(nameof(editorAdapterFactory));
}
if (serviceProvider == null)
{
throw new ArgumentNullException(nameof(serviceProvider));
}
if (completionBroker == null)
{
throw new ArgumentNullException(nameof(completionBroker));
}
this.options = options;
this.editorAdapterFactory = editorAdapterFactory;
this.serviceProvider = serviceProvider;
this.completionBroker = completionBroker;
}
开发者ID:icool123,项目名称:T4Toolbox,代码行数:31,代码来源:TemplateCompletionHandlerProvider.cs
示例18: HostFactory
public HostFactory(
IVim vim,
ITextBufferFactoryService bufferFactoryService,
ITextEditorFactoryService editorFactoryService,
IEditorOptionsFactoryService editorOptionsFactoryService,
IKeyBindingService keyBindingService,
SVsServiceProvider serviceProvider,
IVsEditorAdaptersFactoryService adaptersFactory,
IResharperUtil resharperUtil,
IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
IVsAdapter adapter,
IProtectedOperations protectedOperations,
IVimBufferCoordinatorFactory bufferCoordinatorFactory)
{
_vim = vim;
_keyBindingService = keyBindingService;
_bufferFactoryService = bufferFactoryService;
_editorFactoryService = editorFactoryService;
_editorOptionsFactoryService = editorOptionsFactoryService;
_resharperUtil = resharperUtil;
_displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
_adaptersFactory = adaptersFactory;
_adapter = adapter;
_protectedOperations = protectedOperations;
_bufferCoordinatorFactory = bufferCoordinatorFactory;
_vim.AutoLoadVimRc = false;
}
开发者ID:bajtos,项目名称:VsVim,代码行数:28,代码来源:HostFactory.cs
示例19: JavaEditorConnectionListener
public JavaEditorConnectionListener(SVsServiceProvider serviceProvider)
{
ServiceProvider = serviceProvider;
RegisterSolutionEvents(serviceProvider);
Telemetry.Client.Get().TrackEvent("App.Start");
}
开发者ID:XewTurquish,项目名称:vsminecraft,代码行数:7,代码来源:JavaEditorConnectionListener.cs
示例20: GlobalUndoServiceFactory
public GlobalUndoServiceFactory(
ITextUndoHistoryRegistry undoHistoryRegistry,
SVsServiceProvider serviceProvider,
Lazy<VisualStudioWorkspace> workspace)
{
_singleton = new GlobalUndoService(undoHistoryRegistry, serviceProvider, workspace);
}
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:7,代码来源:GlobalUndoServiceFactory.cs
注:本文中的SVsServiceProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论