Share via


IAsyncExpandingCompletionSource.GetExpandedCompletionContextAsync Method

Definition

Called when user interacts with expander buttons, requesting the completion source to provide additional completion items pertinent to the expander button. For best performance, do not provide Filters unless expansion should add new filters. Called on a background thread.

public:
 System::Threading::Tasks::Task<Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::Data::CompletionContext ^> ^ GetExpandedCompletionContextAsync(Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::IAsyncCompletionSession ^ session, Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::Data::CompletionExpander ^ expander, Microsoft::VisualStudio::Language::Intellisense::AsyncCompletion::Data::CompletionTrigger initialTrigger, Microsoft::VisualStudio::Text::SnapshotSpan applicableToSpan, System::Threading::CancellationToken token);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionContext> GetExpandedCompletionContextAsync (Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSession session, Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionExpander expander, Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionTrigger initialTrigger, Microsoft.VisualStudio.Text.SnapshotSpan applicableToSpan, System.Threading.CancellationToken token);
abstract member GetExpandedCompletionContextAsync : Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionSession * Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionExpander * Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionTrigger * Microsoft.VisualStudio.Text.SnapshotSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data.CompletionContext>
Public Function GetExpandedCompletionContextAsync (session As IAsyncCompletionSession, expander As CompletionExpander, initialTrigger As CompletionTrigger, applicableToSpan As SnapshotSpan, token As CancellationToken) As Task(Of CompletionContext)

Parameters

session
IAsyncCompletionSession

Reference to the active IAsyncCompletionSession

expander
CompletionExpander

Expander which caused this call

initialTrigger
CompletionTrigger

What initially caused the completion

applicableToSpan
SnapshotSpan

Location where completion will take place, on the view's data buffer: TextBuffer

token
CancellationToken

Cancellation token that may interrupt this operation

Returns

A struct that holds CompletionItems and optionally CompletionFilters to merge with existing items and filters.

Applies to