INavigableSymbolSource.GetNavigableSymbolAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Asynchronously gets an INavigableSymbol at the trigger span position.
public:
System::Threading::Tasks::Task<Microsoft::VisualStudio::Language::Intellisense::INavigableSymbol ^> ^ GetNavigableSymbolAsync(Microsoft::VisualStudio::Text::SnapshotSpan triggerSpan, System::Threading::CancellationToken token);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Language.Intellisense.INavigableSymbol> GetNavigableSymbolAsync (Microsoft.VisualStudio.Text.SnapshotSpan triggerSpan, System.Threading.CancellationToken token);
abstract member GetNavigableSymbolAsync : Microsoft.VisualStudio.Text.SnapshotSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Language.Intellisense.INavigableSymbol>
Public Function GetNavigableSymbolAsync (triggerSpan As SnapshotSpan, token As CancellationToken) As Task(Of INavigableSymbol)
Parameters
- triggerSpan
- SnapshotSpan
A 1-character length span over which navigable symbol is queried.
- token
- CancellationToken
A CancellationToken used to cancel the task as needed.
Returns
A task that returns INavigableSymbol upon completion.
Remarks
This async method is called on background thread.
The triggerSpan
is a 1-character span containing the character over which a symbol is queried. This is to disambiguate the case in a projection buffer where the trigger point is between two buffer boundaries and thus multiple symbol sources may be queried. A span eliminates this ambiguity because it can only fall in one buffer.
Providers may return a Task with null results if no navigable symbol is available over the queried triggerSpan
.