4using System.Threading.Tasks;
35 public static void Write(
string value)
37 if (!
string.IsNullOrEmpty(value))
65 public static void Write(ulong value)
67 Write(value.ToString());
74 public static void Write(uint value)
76 Write(value.ToString());
84 public static void Write(
string format, params
object[] arg)
86 Write(
string.Format(format, arg));
96 public static void Write(
string format,
object arg0,
object arg1,
object arg2)
98 Write(
string.Format(format, arg0, arg1, arg2));
107 public static void Write(
string format,
object arg0,
object arg1)
109 Write(
string.Format(format, arg0, arg1));
117 public static void Write(
string format,
object arg0)
119 Write(
string.Format(format, arg0));
126 public static void Write(
float value)
128 Write(value.ToString());
135 public static void Write(
long value)
137 Write(value.ToString());
146 Write(value.ToString());
153 public static void Write(
double value)
155 Write(value.ToString());
162 public static void Write(decimal value)
164 Write(value.ToString());
173 public static void Write(
char[] buffer,
int index,
int count)
175 Write(
new string(buffer, index, count));
182 public static void Write(
char[] buffer)
184 Write(
new string(buffer));
191 public static void Write(
char value)
193 Write(
new string(value, 1));
200 public static void Write(
bool value)
202 Write(value.ToString());
209 public static void Write(
object value)
211 if (!(value is
null))
212 Write(value.ToString());
221 if (!
string.IsNullOrEmpty(value))
238 public static Task
WriteAsync(
char[] buffer,
int index,
int count)
240 return WriteAsync(
new string(buffer, index, count));
326 public static void WriteLine(
string format, params
object[] arg)
338 public static void WriteLine(
string format,
object arg0,
object arg1,
object arg2)
340 WriteLine(
string.Format(format, arg0, arg1, arg2));
349 public static void WriteLine(
string format,
object arg0,
object arg1)
351 WriteLine(
string.Format(format, arg0, arg1));
368 public static void WriteLine(
string format,
object arg0)
415 public static void WriteLine(
char[] buffer,
int index,
int count)
417 WriteLine(
new string(buffer, index, count));
444 if (!(value is
null))
521 get =>
new ConsoleErrorTextWriter();
527 private class ConsoleErrorTextWriter : TextWriter
529 public ConsoleErrorTextWriter()
537 public override void Write(
string format, params
object[] arg) =>
ConsoleError.
Write(format, arg);
538 public override void Write(
string format,
object arg0,
object arg1,
object arg2) =>
ConsoleError.
Write(format, arg0, arg1, arg2);
539 public override void Write(
string format,
object arg0,
object arg1) =>
ConsoleError.
Write(format, arg0, arg1);
540 public override void Write(
string format,
object arg0) =>
ConsoleError.
Write(format, arg0);
547 public override void Write(
char[] buffer,
int index,
int count) =>
ConsoleError.
Write(buffer, index, count);
552 public override Task WriteAsync(
char[] buffer,
int index,
int count) =>
ConsoleError.
WriteAsync(buffer, index, count);
557 public override void WriteLine(
string format, params
object[] arg) =>
ConsoleError.
WriteLine(format, arg);
558 public override void WriteLine(
string format,
object arg0,
object arg1,
object arg2) =>
ConsoleError.
WriteLine(format, arg0, arg1, arg2);
559 public override void WriteLine(
string format,
object arg0,
object arg1) =>
ConsoleError.
WriteLine(format, arg0, arg1);
567 public override void WriteLine(
char[] buffer,
int index,
int count) =>
ConsoleError.
WriteLine(buffer, index, count);
574 public override Task WriteLineAsync(
char[] buffer,
int index,
int count) =>
ConsoleError.
WriteLineAsync(buffer, index, count);
Serializes output to System.Console.Error, and assures modules are not dead-locked in case the Consol...
static void Beep()
Emits a Beep sounds.
static Task WriteAsync(CustomAsyncWriter Writer)
Queues a custom writer to the console output.
static void Write(ulong value)
Queues a value to be written to the console output.
static Encoding Encoding
The character encoding in which the output is written.
static void WriteLine(char[] buffer)
Queues a value to be written to the console output.
static Task WriteLineAsync(char value)
Queues a value to be written to the console output.
static void Write(long value)
Queues a value to be written to the console output.
static void WriteLine(object value)
Queues a value to be written to the console output.
static async Task WriteAsync(CustomAsyncWriter Writer, ConsoleColor? ForegroundColor, ConsoleColor? BackgroundColor)
Queues a custom writer to the console output.
static void WriteLine(double value)
Queues a value to be written to the console output.
static void WriteLine(ulong value)
Queues a value to be written to the console output.
static void WriteLine(char[] buffer, int index, int count)
Queues a value to be written to the console output.
static void Write(uint value)
Queues a value to be written to the console output.
static void Write(CustomWriter Writer)
Queues a custom writer to the console output.
static void WriteLine(int value)
Queues a value to be written to the console output.
static async Task WriteLineAsync(string value)
Queues a value to be written to the console output.
static void WriteLine(decimal value)
Queues a value to be written to the console output.
static async Task WriteAsync(string value)
Queues a value to be written to the console output.
static void WriteLine()
Queues a value to be written to the console output.
static TextWriter Writer
Provides a TextWriter instance, that writes to ConsoleError.
static void Write(float value)
Queues a value to be written to the console output.
static void Write(int value)
Queues a value to be written to the console output.
static void WriteLine(bool value)
Queues a value to be written to the console output.
static void Write(string format, object arg0, object arg1, object arg2)
Queues a value to be written to the console output.
static void WriteLine(long value)
Queues a value to be written to the console output.
static void Write(bool value)
Queues a value to be written to the console output.
static void Write(string format, object arg0)
Queues a value to be written to the console output.
static void Write(object value)
Queues a value to be written to the console output.
static void WriteLine(string value)
Queues a value to be written to the console output.
static void Write(string format, object arg0, object arg1)
Queues a value to be written to the console output.
static Task WriteAsync(char value)
Queues a value to be written to the console output.
static void WriteLine(char value)
Queues a value to be written to the console output.
static void Write(CustomWriter Writer, ConsoleColor? ForegroundColor, ConsoleColor? BackgroundColor)
Queues a custom writer to the console output.
static Task WriteLineAsync(char[] buffer)
Queues a value to be written to the console output.
static Task WriteLineAsync()
Queues a value to be written to the console output.
static void Write(char[] buffer)
Queues a value to be written to the console output.
static void Write(string format, params object[] arg)
Queues a value to be written to the console output.
static void Write(char[] buffer, int index, int count)
Queues a value to be written to the console output.
static void Write(string value)
Queues a value to be written to the console output.
static void Write(char value)
Queues a value to be written to the console output.
static void WriteLine(string format, object arg0, object arg1)
Queues a value to be written to the console output.
static void WriteLine(string format, object arg0, object arg1, object arg2)
Queues a value to be written to the console output.
static string NewLine
The line terminator string for the current TextWriter.
static void WriteLine(string format, object arg0)
Queues a value to be written to the console output.
static void WriteLine(float value)
Queues a value to be written to the console output.
static void Write(decimal value)
Queues a value to be written to the console output.
static void WriteLine(string format, params object[] arg)
Queues a value to be written to the console output.
static IFormatProvider FormatProvider
Gets an object that controls formatting.
static Task WriteAsync(char[] buffer, int index, int count)
Queues a value to be written to the console output.
static Task WriteAsync(char[] buffer)
Queues a value to be written to the console output.
static Task WriteLineAsync(char[] buffer, int index, int count)
Queues a value to be written to the console output.
static void WriteLine(uint value)
Queues a value to be written to the console output.
static void Write(double value)
Queues a value to be written to the console output.
Writes a string to the console, appending a newline at the end.
Writes a string to the console
Processes console tasks, such as input and output, in a serialized asynchronous manner.
static Task< bool > Forward(WorkItem Work)
Forwards a work item for processing.
Represents an asynchronous operation to be performed.
Task< bool > Wait()
Waits for the item to be processed.
delegate void CustomWriter(TextWriter Output)
Delegate for custom writers.
delegate Task CustomAsyncWriter(TextWriter Output)
Delegate for asynchronous custom writers.