MarkdownFencedBlockContext Struct

  • Obsolete: Types with embedded references are not supported in this version of your compiler.
[Obsolete("Types with embedded references are not supported in this version of your compiler.", true)]
public readonly ref struct MarkdownFencedBlockContext

Properties

NameDescription
InfoGets the text after the opening fence, without the whitespace around it.
LineCountGets the number of lines between the fences, for MarkdownFencedBlockContent.RawLines, or 0.
OpeningFenceGets the opening fence.
OptionsGets the options of the parser.
StateGets 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

ReadOnlySpan<char>

Gets the number of lines between the fences, for MarkdownFencedBlockContent.RawLines, or 0.

public int LineCount { get; }

Property value

int

Gets the opening fence.

public ReadOnlySpan<char> OpeningFence { get; }

Property value

ReadOnlySpan<char>

Gets the options of the parser.

public MarkdownParseOptions Options { get; }

Property value

MarkdownParseOptions

Gets the state of the extension for the document, which MarkdownSyntaxExtension.CreateState creates.

public object? State { get; }

Property value

object?

Methods

NameDescription
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.

Gets a line between the fences, without its line ending, and without the markers of its containers.

public ReadOnlySpan<char> GetLine(int index)

Parameters

index int

Returns

ReadOnlySpan<char>

Exceptions

ArgumentOutOfRangeException
index is negative, or not less than MarkdownFencedBlockContext.LineCount.

GetState(MarkdownSyntaxExtension)

MarkdownFencedBlockContext.cs

Gets 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

extension MarkdownSyntaxExtension

Returns

object?

Exceptions

ArgumentException
extension is not in MarkdownParseOptions.SyntaxExtensions.
ArgumentNullException
extension is null.