IBlockContextProvider.TryCreateBlockContextSourceAsync 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.
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.