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
InHtmlCommentboolTrue when the line begins inside an unterminated HTML/Razor comment.
InCodeBlockboolTrue when the line begins inside an open C# code block.
InBlockCommentboolTrue when the line begins inside an unterminated C# block comment.
BraceDepthintThe 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
InBlockComment
True when the line begins inside an unterminated C# block comment.
public bool InBlockComment { get; init; }
Property Value
InCodeBlock
True when the line begins inside an open C# code block.
public bool InCodeBlock { get; init; }
Property Value
InHtmlComment
True when the line begins inside an unterminated HTML/Razor comment.
public bool InHtmlComment { get; init; }