-
Notifications
You must be signed in to change notification settings - Fork 154
/
Copy pathExtendedTextWriter.cs
57 lines (50 loc) · 2.25 KB
/
ExtendedTextWriter.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt
using System.IO;
namespace NUnit.TextDisplay
{
/// <summary>
/// ExtendedTextWriter extends the TextWriter abstract class
/// to support displaying text in color.
/// </summary>
public abstract class ExtendedTextWriter : TextWriter
{
/// <summary>
/// Writes the value with the specified style.
/// </summary>
/// <param name="style">The style.</param>
/// <param name="value">The value.</param>
public abstract void Write(ColorStyle style, string value);
/// <summary>
/// Writes the value with the specified style
/// </summary>
/// <param name="style">The style.</param>
/// <param name="value">The value.</param>
public abstract void WriteLine(ColorStyle style, string value);
/// <summary>
/// Writes the label and the option that goes with it.
/// </summary>
/// <param name="label">The label.</param>
/// <param name="option">The option.</param>
public abstract void WriteLabel(string label, object option);
/// <summary>
/// Writes the label and the option that goes with it.
/// </summary>
/// <param name="label">The label.</param>
/// <param name="option">The option.</param>
/// <param name="valueStyle">The color to display the value with</param>
public abstract void WriteLabel(string label, object option, ColorStyle valueStyle);
/// <summary>
/// Writes the label and the option that goes with it followed by a new line.
/// </summary>
/// <param name="label">The label.</param>
/// <param name="option">The option.</param>
public abstract void WriteLabelLine(string label, object option);
/// <summary>
/// Writes the label and the option that goes with it followed by a new line.
/// </summary>
/// <param name="label">The label.</param>
/// <param name="option">The option.</param>
/// <param name="valueStyle">The color to display the value with</param>
public abstract void WriteLabelLine(string label, object option, ColorStyle valueStyle);
}
}