4using System.Threading.Tasks;
23 public static IFormatProvider
FormatProvider => System.Console.Error.FormatProvider;
28 public static string NewLine => System.Console.Error.NewLine;
34 public static void Write(
string value)
36 if (!
string.IsNullOrEmpty(value))
64 public static void Write(ulong value)
66 Write(value.ToString());
73 public static void Write(uint value)
75 Write(value.ToString());
83 public static void Write(
string format, params
object[] arg)
85 Write(
string.Format(format, arg));
95 public static void Write(
string format,
object arg0,
object arg1,
object arg2)
97 Write(
string.Format(format, arg0, arg1, arg2));
106 public static void Write(
string format,
object arg0,
object arg1)
108 Write(
string.Format(format, arg0, arg1));
116 public static void Write(
string format,
object arg0)
118 Write(
string.Format(format, arg0));
125 public static void Write(
float value)
127 Write(value.ToString());
134 public static void Write(
long value)
136 Write(value.ToString());
145 Write(value.ToString());
152 public static void Write(
double value)
154 Write(value.ToString());
161 public static void Write(decimal value)
163 Write(value.ToString());
172 public static void Write(
char[] buffer,
int index,
int count)
174 Write(
new string(buffer, index, count));
181 public static void Write(
char[] buffer)
183 Write(
new string(buffer));
190 public static void Write(
char value)
192 Write(
new string(value, 1));
199 public static void Write(
bool value)
201 Write(value.ToString());
208 public static void Write(
object value)
210 if (!(value is
null))
211 Write(value.ToString());
220 if (!
string.IsNullOrEmpty(value))
237 public static Task
WriteAsync(
char[] buffer,
int index,
int count)
239 return WriteAsync(
new string(buffer, index, count));
325 public static void WriteLine(
string format, params
object[] arg)
337 public static void WriteLine(
string format,
object arg0,
object arg1,
object arg2)
339 WriteLine(
string.Format(format, arg0, arg1, arg2));
348 public static void WriteLine(
string format,
object arg0,
object arg1)
350 WriteLine(
string.Format(format, arg0, arg1));
367 public static void WriteLine(
string format,
object arg0)
414 public static void WriteLine(
char[] buffer,
int index,
int count)
416 WriteLine(
new string(buffer, index, count));
443 if (!(value is
null))
520 get =>
new ConsoleErrorTextWriter();
526 private class ConsoleErrorTextWriter : TextWriter
528 public ConsoleErrorTextWriter()
536 public override void Write(
string format, params
object[] arg) =>
ConsoleError.
Write(format, arg);
537 public override void Write(
string format,
object arg0,
object arg1,
object arg2) =>
ConsoleError.
Write(format, arg0, arg1, arg2);
538 public override void Write(
string format,
object arg0,
object arg1) =>
ConsoleError.
Write(format, arg0, arg1);
539 public override void Write(
string format,
object arg0) =>
ConsoleError.
Write(format, arg0);
546 public override void Write(
char[] buffer,
int index,
int count) =>
ConsoleError.
Write(buffer, index, count);
551 public override Task WriteAsync(
char[] buffer,
int index,
int count) =>
ConsoleError.
WriteAsync(buffer, index, count);
556 public override void WriteLine(
string format, params
object[] arg) =>
ConsoleError.
WriteLine(format, arg);
557 public override void WriteLine(
string format,
object arg0,
object arg1,
object arg2) =>
ConsoleError.
WriteLine(format, arg0, arg1, arg2);
558 public override void WriteLine(
string format,
object arg0,
object arg1) =>
ConsoleError.
WriteLine(format, arg0, arg1);
566 public override void WriteLine(
char[] buffer,
int index,
int count) =>
ConsoleError.
WriteLine(buffer, index, count);
573 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 > Queue(WorkItem Work)
Queues a work item.
Manages a Console operation.
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.