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


C# SVsServiceProvider类代码示例

本文整理汇总了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));
        }
开发者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


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