Partilhar via


ISuggestedActionsSource2.GetSuggestedActionCategoriesAsync Method

Definition

Gets a ISuggestedActionCategorySet which are known to have ISuggestedActions which are applicable to the span of text defined by range.

public:
 System::Threading::Tasks::Task<Microsoft::VisualStudio::Language::Intellisense::ISuggestedActionCategorySet ^> ^ GetSuggestedActionCategoriesAsync(Microsoft::VisualStudio::Language::Intellisense::ISuggestedActionCategorySet ^ requestedActionCategories, Microsoft::VisualStudio::Text::SnapshotSpan range, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Language.Intellisense.ISuggestedActionCategorySet> GetSuggestedActionCategoriesAsync (Microsoft.VisualStudio.Language.Intellisense.ISuggestedActionCategorySet requestedActionCategories, Microsoft.VisualStudio.Text.SnapshotSpan range, System.Threading.CancellationToken cancellationToken);
abstract member GetSuggestedActionCategoriesAsync : Microsoft.VisualStudio.Language.Intellisense.ISuggestedActionCategorySet * Microsoft.VisualStudio.Text.SnapshotSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Language.Intellisense.ISuggestedActionCategorySet>
Public Function GetSuggestedActionCategoriesAsync (requestedActionCategories As ISuggestedActionCategorySet, range As SnapshotSpan, cancellationToken As CancellationToken) As Task(Of ISuggestedActionCategorySet)

Parameters

requestedActionCategories
ISuggestedActionCategorySet

A set of suggested action categories requested.

range
SnapshotSpan

A span of text in the ITextBuffer over which to return suggested actions.

cancellationToken
CancellationToken

A cancellation token that allows to cancel getting list of suggested actions.

Returns

A ISuggestedActionCategorySet containing the set of categories with actions applicable to range. Implementers are encouraged to use the predefined sets on ISuggestedActionCategoryRegistryService.

Remarks

Usage of this method supersedes HasSuggestedActionsAsync(ISuggestedActionCategorySet, SnapshotSpan, CancellationToken). Implementers must return this same set of categories from GetSuggestedActions(ISuggestedActionCategorySet, SnapshotSpan, CancellationToken), mapping each category to an ISuggestedActionSet containing all of the actions for that category.

Applies to