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


C# IAsynchronousOperationListener类代码示例

本文整理汇总了C#中IAsynchronousOperationListener的典型用法代码示例。如果您正苦于以下问题:C# IAsynchronousOperationListener类的具体用法?C# IAsynchronousOperationListener怎么用?C# IAsynchronousOperationListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IAsynchronousOperationListener类属于命名空间,在下文中一共展示了IAsynchronousOperationListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TagComputer

            public TagComputer(
                ITextBuffer subjectBuffer,
                IForegroundNotificationService notificationService,
                IAsynchronousOperationListener asyncListener,
                ClassificationTypeMap typeMap,
                SyntacticClassificationTaggerProvider taggerProvider,
                IViewSupportsClassificationService viewSupportsClassificationServiceOpt,
                ITextBufferAssociatedViewService associatedViewService,
                IEditorClassificationService editorClassificationService,
                string languageName)
            {
                _subjectBuffer = subjectBuffer;
                _notificationService = notificationService;
                _listener = asyncListener;
                _typeMap = typeMap;
                _taggerProvider = taggerProvider;
                _viewSupportsClassificationServiceOpt = viewSupportsClassificationServiceOpt;
                _associatedViewService = associatedViewService;
                _editorClassificationService = editorClassificationService;
                _languageName = languageName;

                _workQueue = new AsynchronousSerialWorkQueue(asyncListener);
                _reportChangeCancellationSource = new CancellationTokenSource();

                _lastLineCache = new LastLineCache();

                _workspaceRegistration = Workspace.GetWorkspaceRegistration(subjectBuffer.AsTextContainer());
                _workspaceRegistration.WorkspaceChanged += OnWorkspaceRegistrationChanged;

                ConnectToWorkspace(_workspaceRegistration.Workspace);
            }
开发者ID:JackWangCUMT,项目名称:roslyn,代码行数:31,代码来源:SyntacticClassificationTaggerProvider.TagComputer.cs

示例2: CreateDiagnosticAnalyzerService

 private static DiagnosticAnalyzerService CreateDiagnosticAnalyzerService(
     Dictionary<string, DiagnosticAnalyzer[]> analyzerMap, IAsynchronousOperationListener listener)
 {
     return analyzerMap == null || analyzerMap.Count == 0
         ? new MyDiagnosticAnalyzerService(DiagnosticExtensions.GetCompilerDiagnosticAnalyzersMap(), listener: listener)
         : new MyDiagnosticAnalyzerService(analyzerMap.ToImmutableDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutableArray()), listener: listener);
 }
开发者ID:togglebrain,项目名称:roslyn,代码行数:7,代码来源:DiagnosticsSquiggleTaggerProviderTests.cs

示例3: NavigationBarController

        public NavigationBarController(
            INavigationBarPresenter presenter,
            ITextBuffer subjectBuffer,
            IWaitIndicator waitIndicator,
            IAsynchronousOperationListener asyncListener)
        {
            _presenter = presenter;
            _subjectBuffer = subjectBuffer;
            _waitIndicator = waitIndicator;
            _asyncListener = asyncListener;
            _workspaceRegistration = Workspace.GetWorkspaceRegistration(subjectBuffer.AsTextContainer());
            _workspaceRegistration.WorkspaceChanged += OnWorkspaceRegistrationChanged;

            presenter.CaretMoved += OnCaretMoved;
            presenter.ViewFocused += OnViewFocused;

            presenter.DropDownFocused += OnDropDownFocused;
            presenter.ItemSelected += OnItemSelected;

            subjectBuffer.PostChanged += OnSubjectBufferPostChanged;

            // Initialize the tasks to be an empty model so we never have to deal with a null case.
            _modelTask = Task.FromResult(
                new NavigationBarModel(
                    SpecializedCollections.EmptyList<NavigationBarItem>(),
                    default(VersionStamp),
                    null));

            _selectedItemInfoTask = Task.FromResult(new NavigationBarSelectedTypeAndMember(null, null));

            if (_workspaceRegistration.Workspace != null)
            {
                ConnectToWorkspace(_workspaceRegistration.Workspace);
            }
        }
开发者ID:Rickinio,项目名称:roslyn,代码行数:35,代码来源:NavigationBarController.cs

示例4: VisualStudioRuleSetManager

 public VisualStudioRuleSetManager(
     IVsFileChangeEx fileChangeService, IForegroundNotificationService foregroundNotificationService, IAsynchronousOperationListener listener)
 {
     _fileChangeService = fileChangeService;
     _foregroundNotificationService = foregroundNotificationService;
     _listener = listener;
 }
开发者ID:GuilhermeSa,项目名称:roslyn,代码行数:7,代码来源:VisualStudioRuleSetManager.cs

示例5: TagComputer

            public TagComputer(
                ITextBuffer subjectBuffer,
                IForegroundNotificationService notificationService,
                IAsynchronousOperationListener asyncListener,
                ClassificationTypeMap typeMap,
                SyntacticClassificationTaggerProvider taggerProvider)
            {
                _subjectBuffer = subjectBuffer;
                _notificationService = notificationService;
                _listener = asyncListener;
                _typeMap = typeMap;
                _taggerProvider = taggerProvider;

                _workQueue = new AsynchronousSerialWorkQueue(asyncListener);
                _reportChangeCancellationSource = new CancellationTokenSource();

                _lastLineCache = new LastLineCache();

                _workspaceRegistration = Workspace.GetWorkspaceRegistration(subjectBuffer.AsTextContainer());
                _workspaceRegistration.WorkspaceChanged += OnWorkspaceRegistrationChanged;

                if (_workspaceRegistration.Workspace != null)
                {
                    ConnectToWorkspace(_workspaceRegistration.Workspace);
                }
            }
开发者ID:rgani,项目名称:roslyn,代码行数:26,代码来源:SyntacticClassificationTaggerProvider.TagComputer.cs

示例6: Searcher

            public Searcher(
                Solution solution,
                IAsynchronousOperationListener asyncListener,
                INavigateToItemDisplayFactory displayFactory,
                INavigateToCallback callback,
                string searchPattern,
                bool searchCurrentDocument,
                CancellationToken cancellationToken)
            {
                _solution = solution;
                _displayFactory = displayFactory;
                _callback = callback;
                _searchPattern = searchPattern;
                _searchCurrentDocument = searchCurrentDocument;
                _cancellationToken = cancellationToken;
                _progress = new ProgressTracker(callback.ReportProgress);
                _asyncListener = asyncListener;

                if (_searchCurrentDocument)
                {
                    var documentService = _solution.Workspace.Services.GetService<IDocumentTrackingService>();
                    var activeId = documentService.GetActiveDocument();
                    _currentDocument = activeId != null ? _solution.GetDocument(activeId) : null;
                }
            }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:25,代码来源:NavigateToItemProvider.Searcher.cs

示例7: CodeModelIncrementalAnalyzerProvider

 public CodeModelIncrementalAnalyzerProvider(
     IForegroundNotificationService notificationService,
     [ImportMany]IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> listeners)
 {
     _listener = new AggregateAsynchronousOperationListener(listeners, FeatureAttribute.CodeModel);
     _notificationService = notificationService;
 }
开发者ID:SoumikMukherjeeDOTNET,项目名称:roslyn,代码行数:7,代码来源:CodeModelIncrementalAnalyzer.cs

示例8: VisualStudioErrorReportingService

 public VisualStudioErrorReportingService(
     VisualStudioWorkspaceImpl workspace, IForegroundNotificationService foregroundNotificationService, IAsynchronousOperationListener listener)
 {
     _workspace = workspace;
     _foregroundNotificationService = foregroundNotificationService;
     _listener = listener;
 }
开发者ID:gnuhub,项目名称:roslyn,代码行数:7,代码来源:VisualStudioErrorReportingService.cs

示例9: CallHierarchyProvider

 public CallHierarchyProvider(
     [ImportMany] IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners,
     IGlyphService glyphService)
 {
     _asyncListener = new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.CallHierarchy);
     this.GlyphService = glyphService;
 }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:7,代码来源:CallHierarchyProvider.cs

示例10: TrackingSession

            public TrackingSession(StateMachine stateMachine, SnapshotSpan snapshotSpan, IAsynchronousOperationListener asyncListener)
            {
                AssertIsForeground();

                _asyncListener = asyncListener;
                _trackingSpan = snapshotSpan.Snapshot.CreateTrackingSpan(snapshotSpan.Span, SpanTrackingMode.EdgeInclusive);
                _cancellationTokenSource = new CancellationTokenSource();
                _cancellationToken = _cancellationTokenSource.Token;

                if (snapshotSpan.Length > 0)
                {
                    // If the snapshotSpan is nonempty, then the session began with a change that
                    // was touching a word. Asynchronously determine whether that word was a
                    // renamable identifier. If it is, alert the state machine so it can trigger
                    // tagging.

                    _originalName = snapshotSpan.GetText();
                    _isRenamableIdentifierTask = Task.Factory.SafeStartNewFromAsync(
                        () => DetermineIfRenamableIdentifierAsync(snapshotSpan, initialCheck: true),
                        _cancellationToken,
                        TaskScheduler.Default);

                    QueueUpdateToStateMachine(stateMachine, _isRenamableIdentifierTask);
                }
                else
                {
                    // If the snapshotSpan is empty, that means text was added in a location that is
                    // not touching an existing word, which happens a fair amount when writing new
                    // code. In this case we already know that the user is not renaming an
                    // identifier.

                    _isRenamableIdentifierTask = s_notRenamableTask;
                }
            }
开发者ID:elemk0vv,项目名称:roslyn-1,代码行数:34,代码来源:RenameTrackingTaggerProvider.TrackingSession.cs

示例11: RemoteHostClientServiceFactory

 public RemoteHostClientServiceFactory(
     [ImportMany] IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners,
     IDiagnosticAnalyzerService analyzerService)
 {
     _listener = new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.RemoteHostClient);
     _analyzerService = analyzerService;
 }
开发者ID:TyOverby,项目名称:roslyn,代码行数:7,代码来源:RemoteHostClientServiceFactory.cs

示例12: StateMachine

 public StateMachine(ITextBuffer buffer, IInlineRenameService inlineRenameService, IAsynchronousOperationListener asyncListener)
 {
     _buffer = buffer;
     _buffer.Changed += Buffer_Changed;
     _inlineRenameService = inlineRenameService;
     _asyncListener = asyncListener;
 }
开发者ID:elemk0vv,项目名称:roslyn-1,代码行数:7,代码来源:RenameTrackingTaggerProvider.StateMachine.cs

示例13: StreamingFindReferencesPresenter

        public StreamingFindReferencesPresenter(
            Shell.SVsServiceProvider serviceProvider,
            ITextBufferFactoryService textBufferFactoryService,
            IProjectionBufferFactoryService projectionBufferFactoryService,
            IEditorOptionsFactoryService editorOptionsFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            IContentTypeRegistryService contentTypeRegistryService,
            ClassificationTypeMap typeMap,
            IEditorFormatMapService formatMapService,
            [ImportMany] IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners)
        {
            _serviceProvider = serviceProvider;
            _textBufferFactoryService = textBufferFactoryService;
            _projectionBufferFactoryService = projectionBufferFactoryService;
            _editorOptionsFactoryService = editorOptionsFactoryService;
            _contentTypeRegistryService = contentTypeRegistryService;

            _textEditorFactoryService = textEditorFactoryService;
            _typeMap = typeMap;
            _formatMapService = formatMapService;

            _asyncListener = new AggregateAsynchronousOperationListener(
                asyncListeners, FeatureAttribute.ReferenceHighlighting);

            _vsFindAllReferencesService = (IFindAllReferencesService)_serviceProvider.GetService(typeof(SVsFindAllReferences));
        }
开发者ID:tvsonar,项目名称:roslyn,代码行数:26,代码来源:StreamingFindReferencesPresenter.cs

示例14: SolutionCrawlerProgressReporter

            public SolutionCrawlerProgressReporter(IAsynchronousOperationListener listener)
            {
                _listener = listener;
                _eventQueue = new SimpleTaskQueue(TaskScheduler.Default);
                _eventMap = new EventMap();

                _count = 0;
            }
开发者ID:GeertVL,项目名称:roslyn,代码行数:8,代码来源:SolutionCrawlerProgressReporter.cs

示例15: SuggestedActionWithPreview

 public SuggestedActionWithPreview(
     Workspace workspace, ITextBuffer subjectBuffer, ICodeActionEditHandlerService editHandler, 
     IWaitIndicator waitIndicator, CodeAction codeAction, object provider, 
     IAsynchronousOperationListener operationListener) 
     : base(workspace, subjectBuffer, editHandler, waitIndicator, codeAction,
           provider, operationListener, actionSets: null)
 {
 }
开发者ID:genlu,项目名称:roslyn,代码行数:8,代码来源:SuggestedActionWithPreview.cs


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