Skip to content

Parser Class

A BBCode string parser.

C#
public class Parser : IParser

Inheritance object

Implements IParser

Creates a new instanace of the class.

C#
public Parser()

A collection of tags used by the parser.

C#
public Dictionary<string, Type> Tags { get; set; }

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

Section titled “Parse(ReadOnlySpan<char>, int, ICellSurface?, ParseCommandStacks?)”

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

C#
public ColoredString Parse(ReadOnlySpan<char> value, int surfaceIndex = -1, ICellSurface? surface = null, ParseCommandStacks? initialBehaviors = null)

value ReadOnlySpan<char>
The string to parse.

surfaceIndex int
Index of where this string will be printed.

surface ICellSurface
The surface the string will be printed to.

initialBehaviors ParseCommandStacks
Any initial defaults.

ColoredString
The finalized string.