Table of Contents

Class RazorLineState

Namespace
SharpConsoleUI.Highlighting
Assembly
SharpConsoleUI.dll

Per-line parser state for the Razor highlighter (tracks HTML comment, code block, and brace depth).

public record RazorLineState : SyntaxLineState, IEquatable<SyntaxLineState>, IEquatable<RazorLineState>
Inheritance
RazorLineState
Implements
Inherited Members
Extension Methods

Constructors

RazorLineState(bool, bool, bool, int)

Per-line parser state for the Razor highlighter (tracks HTML comment, code block, and brace depth).

public RazorLineState(bool InHtmlComment = false, bool InCodeBlock = false, bool InBlockComment = false, int BraceDepth = 0)

Parameters

InHtmlComment bool

True when the line begins inside an unterminated HTML/Razor comment.

InCodeBlock bool

True when the line begins inside an open C# code block.

InBlockComment bool

True when the line begins inside an unterminated C# block comment.

BraceDepth int

The open brace nesting depth carried into the line.

Properties

BraceDepth

The open brace nesting depth carried into the line.

public int BraceDepth { get; init; }

Property Value

int

InBlockComment

True when the line begins inside an unterminated C# block comment.

public bool InBlockComment { get; init; }

Property Value

bool

InCodeBlock

True when the line begins inside an open C# code block.

public bool InCodeBlock { get; init; }

Property Value

bool

InHtmlComment

True when the line begins inside an unterminated HTML/Razor comment.

public bool InHtmlComment { get; init; }

Property Value

bool