Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ConsoleOutCustomWriter.cs
1using System;
2using System.Threading.Tasks;
3
5{
10 {
11 private readonly CustomWriter writer;
12
19 public ConsoleOutCustomWriter(CustomWriter Writer, ConsoleColor? ForegroundColor, ConsoleColor? BackgroundColor)
20 : base(ForegroundColor, BackgroundColor)
21 {
22 this.writer = Writer;
23 }
24
28 protected override Task DoWrite()
29 {
30 this.writer(System.Console.Out);
31 return Task.CompletedTask;
32 }
33 }
34}
Abstract base class for custom writers
override Task DoWrite()
Method that does the actual custom writing.
ConsoleOutCustomWriter(CustomWriter Writer, ConsoleColor? ForegroundColor, ConsoleColor? BackgroundColor)
Performs custom writing
delegate void CustomWriter(TextWriter Output)
Delegate for custom writers.