MarkdownFencedBlockContext Struct
- Obsolete: Types with embedded references are not supported in this version of your compiler.
A block of a MarkdownFencedBlockExtension that is closed, for MarkdownFencedBlockExtension.OnClosed.
[Obsolete("Types with embedded references are not supported in this version of your compiler.", true)]
public readonly ref struct MarkdownFencedBlockContextProperties
| Name | Description |
|---|---|
| Info | Gets the text after the opening fence, without the whitespace around it. |
| LineCount | Gets the number of lines between the fences, for MarkdownFencedBlockContent.RawLines, or 0. |
| OpeningFence | Gets the opening fence. |
| Options | Gets the options of the parser. |
| State | Gets the state of the extension for the document, which MarkdownSyntaxExtension.CreateState creates. |
Gets the text after the opening fence, without the whitespace around it.
public ReadOnlySpan<char> Info { get; }Property value
LineCount
MarkdownFencedBlockContext.csGets the number of lines between the fences, for MarkdownFencedBlockContent.RawLines, or 0.
public int LineCount { get; }Property value
OpeningFence
MarkdownFencedBlockContext.csGets the state of the extension for the document, which MarkdownSyntaxExtension.CreateState creates.
public object? State { get; }Property value
Methods
| Name | Description |
|---|---|
| GetLine(int) | Gets a line between the fences, without its line ending, and without the markers of its containers. |
| GetState(MarkdownSyntaxExtension) | Gets the state of another extension of the options for the document, such as the block extension whose definitions an inline extension reads. |
GetLine(int)
MarkdownFencedBlockContext.csGets a line between the fences, without its line ending, and without the markers of its containers.
public ReadOnlySpan<char> GetLine(int index)Parameters
indexint
Returns
Exceptions
ArgumentOutOfRangeExceptionindexis negative, or not less thanMarkdownFencedBlockContext.LineCount.
GetState(MarkdownSyntaxExtension)
MarkdownFencedBlockContext.csGets the state of another extension of the options for the document, such as the block extension whose definitions an inline extension reads.
public object? GetState(MarkdownSyntaxExtension extension)Parameters
extensionMarkdownSyntaxExtension
Returns
Exceptions
ArgumentExceptionextensionis not inMarkdownParseOptions.SyntaxExtensions.ArgumentNullExceptionextensionisnull.