Share via


INavigableSymbolSourceProvider.TryCreateNavigableSymbolSource Method

Definition

Creates an INavigableSymbolSource for the given ITextBuffer in the specified ITextView.

public:
 Microsoft::VisualStudio::Language::Intellisense::INavigableSymbolSource ^ TryCreateNavigableSymbolSource(Microsoft::VisualStudio::Text::Editor::ITextView ^ textView, Microsoft::VisualStudio::Text::ITextBuffer ^ buffer);
public Microsoft.VisualStudio.Language.Intellisense.INavigableSymbolSource TryCreateNavigableSymbolSource (Microsoft.VisualStudio.Text.Editor.ITextView textView, Microsoft.VisualStudio.Text.ITextBuffer buffer);
abstract member TryCreateNavigableSymbolSource : Microsoft.VisualStudio.Text.Editor.ITextView * Microsoft.VisualStudio.Text.ITextBuffer -> Microsoft.VisualStudio.Language.Intellisense.INavigableSymbolSource
Public Function TryCreateNavigableSymbolSource (textView As ITextView, buffer As ITextBuffer) As INavigableSymbolSource

Parameters

textView
ITextView

The ITextView in which the text buffer was created.

buffer
ITextBuffer

The ITextBuffer for which the INavigableSymbolSource is created.

Returns

A valid INavigableSymbolSource, or null if the provider could not create one.

Remarks

This method should only be called once on the buffer whose content type matches the provider's.

If there are multiple sources matching the content type of the given text buffer, the best match based on the Order is used when calling GetNavigableSymbolAsync(SnapshotSpan, CancellationToken).

Applies to