-
Notifications
You must be signed in to change notification settings - Fork 0
/
AnsiControlString.cs
34 lines (31 loc) · 1.05 KB
/
AnsiControlString.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
namespace Microlithix.Text.Ansi.Element;
///----------------------------------------------------------------------------
/// <summary>
/// Represents a complete control string from the parsed input.
/// </summary>
///----------------------------------------------------------------------------
public record AnsiControlString : IAnsiStringParserElement {
/// <summary>
/// The type of the control string.
/// </summary>
public ControlStringType Type { get; init; }
/// <summary>
/// The content of the control string.
/// </summary>
public string Text { get; init; }
/// <summary>
/// Creates a new <see cref="AnsiControlString"/>
/// instance with the specified string type and content.
/// </summary>
///
/// <param name="type">
/// Specifies the type of the control string.
/// </param>
/// <param name="text">
/// Specifies the content of the control string.
/// </param>
public AnsiControlString(ControlStringType type, string text) {
Type = type;
Text = text;
}
}