IBlockContextProvider.TryCreateBlockContextSourceAsync Method

Definition

Creates a block context source for the given text buffer.

public:
 System::Threading::Tasks::Task<Microsoft::VisualStudio::Text::Adornments::IBlockContextSource ^> ^ TryCreateBlockContextSourceAsync(Microsoft::VisualStudio::Text::ITextBuffer ^ textBuffer, System::Threading::CancellationToken token);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Text.Adornments.IBlockContextSource> TryCreateBlockContextSourceAsync (Microsoft.VisualStudio.Text.ITextBuffer textBuffer, System.Threading.CancellationToken token);
abstract member TryCreateBlockContextSourceAsync : Microsoft.VisualStudio.Text.ITextBuffer * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Text.Adornments.IBlockContextSource>
Public Function TryCreateBlockContextSourceAsync (textBuffer As ITextBuffer, token As CancellationToken) As Task(Of IBlockContextSource)

Parameters

textBuffer
ITextBuffer

The text buffer for which to create a provider.

token
CancellationToken

The cancelation token for this asynchronous method call.

Returns

A valid IBlockContextSource instance, or null if none could be created.

Applies to