Freigeben über


IAsyncCompletionBroker.GetAggregatedCompletionContextAsync Method

Definition

Requests CompletionContexts from applicable IAsyncCompletionSources and aggregates them. Does not trigger completion, does not raise events, does not open the completion GUI. The IAsyncCompletionSession which interacted with IAsyncCompletionSources is returned as InertSession and does not have full capabilities of IAsyncCompletionSession.

This method can be invoked from any thread, but it briefly switches to UI thread. Returns Empty when token is canceled.

public:
 System::Threading::Tasks::Task<Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::Data::AggregatedCompletionContext ^> ^ GetAggregatedCompletionContextAsync(Microsoft::VisualStudio::Text::Editor::ITextView ^ textView, Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::Data::CompletionTrigger trigger, Microsoft::VisualStudio::Text::SnapshotPoint triggerLocation, System::Threading::CancellationToken token);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.AggregatedCompletionContext> GetAggregatedCompletionContextAsync (Microsoft.VisualStudio.Text.Editor.ITextView textView, Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionTrigger trigger, Microsoft.VisualStudio.Text.SnapshotPoint triggerLocation, System.Threading.CancellationToken token);
abstract member GetAggregatedCompletionContextAsync : Microsoft.VisualStudio.Text.Editor.ITextView * Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionTrigger * Microsoft.VisualStudio.Text.SnapshotPoint * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.AggregatedCompletionContext>
Public Function GetAggregatedCompletionContextAsync (textView As ITextView, trigger As CompletionTrigger, triggerLocation As SnapshotPoint, token As CancellationToken) As Task(Of AggregatedCompletionContext)

Parameters

textView
ITextView

View that hosts completion and relevant buffers

trigger
CompletionTrigger

What caused completion

triggerLocation
SnapshotPoint

Location of completion on the view's data buffer: TextBuffer. Used to pick relevant IAsyncCompletionSources

token
CancellationToken

Cancellation token that may interrupt this operation

Returns

AggregatedCompletionContext which contains IAsyncCompletionSession which interacted with IAsyncCompletionSources and the aggregate CompletionContext

Applies to