-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTextWriterOutput.cs
More file actions
32 lines (29 loc) · 886 Bytes
/
TextWriterOutput.cs
File metadata and controls
32 lines (29 loc) · 886 Bytes
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
using System;
using System.IO;
namespace Ultz.Extensions.Logging
{
/// <summary>
/// An implementation of <see cref="IOutput" /> using a <see cref="TextWriter" /> for output.
/// </summary>
/// <remarks>
/// Does not support coloured messages.
/// </remarks>
public class TextWriterOutput : IOutput
{
private readonly TextWriter _base;
/// <summary>
/// Constructs a new instance of <see cref="TextWriterOutput" /> using the given <see cref="TextWriter" /> as the
/// output.
/// </summary>
/// <param name="base">The <see cref="TextWriter" /> to use.</param>
public TextWriterOutput(TextWriter @base)
{
_base = @base;
}
/// <inheritdoc />
public void Write(string msg, ConsoleColor? color)
{
_base.Write(msg);
}
}
}