本文整理汇总了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);
}
示例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);
}
示例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);
}
}
示例4: VisualStudioRuleSetManager
public VisualStudioRuleSetManager(
IVsFileChangeEx fileChangeService, IForegroundNotificationService foregroundNotificationService, IAsynchronousOperationListener listener)
{
_fileChangeService = fileChangeService;
_foregroundNotificationService = foregroundNotificationService;
_listener = listener;
}
示例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);
}
}
示例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;
}
}
示例7: CodeModelIncrementalAnalyzerProvider
public CodeModelIncrementalAnalyzerProvider(
IForegroundNotificationService notificationService,
[ImportMany]IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> listeners)
{
_listener = new AggregateAsynchronousOperationListener(listeners, FeatureAttribute.CodeModel);
_notificationService = notificationService;
}
示例8: VisualStudioErrorReportingService
public VisualStudioErrorReportingService(
VisualStudioWorkspaceImpl workspace, IForegroundNotificationService foregroundNotificationService, IAsynchronousOperationListener listener)
{
_workspace = workspace;
_foregroundNotificationService = foregroundNotificationService;
_listener = listener;
}
示例9: CallHierarchyProvider
public CallHierarchyProvider(
[ImportMany] IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners,
IGlyphService glyphService)
{
_asyncListener = new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.CallHierarchy);
this.GlyphService = glyphService;
}
示例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;
}
}
示例11: RemoteHostClientServiceFactory
public RemoteHostClientServiceFactory(
[ImportMany] IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners,
IDiagnosticAnalyzerService analyzerService)
{
_listener = new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.RemoteHostClient);
_analyzerService = analyzerService;
}
示例12: StateMachine
public StateMachine(ITextBuffer buffer, IInlineRenameService inlineRenameService, IAsynchronousOperationListener asyncListener)
{
_buffer = buffer;
_buffer.Changed += Buffer_Changed;
_inlineRenameService = inlineRenameService;
_asyncListener = asyncListener;
}
示例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));
}
示例14: SolutionCrawlerProgressReporter
public SolutionCrawlerProgressReporter(IAsynchronousOperationListener listener)
{
_listener = listener;
_eventQueue = new SimpleTaskQueue(TaskScheduler.Default);
_eventMap = new EventMap();
_count = 0;
}
示例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)
{
}