Show / Hide Table of Contents

Class Default

The default string parser.

Inheritance
object
Default
Implements
IParser
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: SadConsole.StringParser
Assembly: SadConsole.dll
Syntax
public class Default : IParser

Constructors

Default()

Declaration
public Default()

Fields

CustomProcessor

Custom processor called before the build in command resolver.

Declaration
public Func<string, string, ColoredGlyphAndEffect[], ICellSurface?, ParseCommandStacks?, ParseCommandBase?>? CustomProcessor
Field Value
Type Description
Func<string, string, ColoredGlyphAndEffect[], ICellSurface, ParseCommandStacks, ParseCommandBase>
Remarks

Signature is ("command", "parameters", existing glyphs, text surface, associated editor, command stacks).

Properties

Variables

A dictionary of variable resolution methods.

Declaration
public Dictionary<string, Func<string>> Variables { get; }
Property Value
Type Description
Dictionary<string, Func<string>>

Methods

Parse(ReadOnlySpan<char>, int, ICellSurface?, ParseCommandStacks?)

Creates a colored string by parsing commands embedded in the string.

Declaration
public ColoredString Parse(ReadOnlySpan<char> value, int surfaceIndex = -1, ICellSurface? surface = null, ParseCommandStacks? initialBehaviors = null)
Parameters
Type Name Description
ReadOnlySpan<char> value

The string to parse.

int surfaceIndex

Index of where this string will be printed.

ICellSurface surface

The surface the string will be printed to.

ParseCommandStacks initialBehaviors

Any initial defaults.

Returns
Type Description
ColoredString

The finalized string.

Implements

IParser

Extension Methods

ExtensionsSystem.GetDebuggerDisplayValue(object)
In this article

Back to top

Back to top Generated by DocFX