using System; using System.IO; using System.Text; namespace System { /// Represents the standard input, output, and error streams for console applications. This class cannot be inherited. /// 1 // Token: 0x02000645 RID: 1605 public static class Console { // Token: 0x06003B76 RID: 15222 RVA: 0x000CA8CC File Offset: 0x000C8ACC static Console() { if (Environment.IsRunningOnWindows) { Console.inputEncoding = (Console.outputEncoding = Encoding.Default); } else { int num = 0; Encoding.InternalCodePage(ref num); if (num != -1 && ((num & 268435455) == 3 || (num & 268435456) != 0)) { Console.inputEncoding = (Console.outputEncoding = Encoding.UTF8Unmarked); } else { Console.inputEncoding = (Console.outputEncoding = Encoding.Default); } } Console.SetEncodings(Console.inputEncoding, Console.outputEncoding); } // Token: 0x06003B77 RID: 15223 RVA: 0x000CA958 File Offset: 0x000C8B58 private static void SetEncodings(Encoding inputEncoding, Encoding outputEncoding) { Console.stderr = new UnexceptionalStreamWriter(Console.OpenStandardError(0), outputEncoding); ((StreamWriter)Console.stderr).AutoFlush = true; Console.stderr = TextWriter.Synchronized(Console.stderr, true); Console.stdout = new UnexceptionalStreamWriter(Console.OpenStandardOutput(0), outputEncoding); ((StreamWriter)Console.stdout).AutoFlush = true; Console.stdout = TextWriter.Synchronized(Console.stdout, true); Console.stdin = new UnexceptionalStreamReader(Console.OpenStandardInput(0), inputEncoding); Console.stdin = TextReader.Synchronized(Console.stdin); GC.SuppressFinalize(Console.stdout); GC.SuppressFinalize(Console.stderr); GC.SuppressFinalize(Console.stdin); } /// Gets the standard error output stream. /// A that represents the standard error output stream. /// 1 // Token: 0x17000B5D RID: 2909 // (get) Token: 0x06003B78 RID: 15224 RVA: 0x000CAA08 File Offset: 0x000C8C08 public static TextWriter Error { get { return Console.stderr; } } /// Gets the standard output stream. /// A that represents the standard output stream. /// 1 // Token: 0x17000B5E RID: 2910 // (get) Token: 0x06003B79 RID: 15225 RVA: 0x000CAA10 File Offset: 0x000C8C10 public static TextWriter Out { get { return Console.stdout; } } /// Gets the standard input stream. /// A that represents the standard input stream. /// 1 // Token: 0x17000B5F RID: 2911 // (get) Token: 0x06003B7A RID: 15226 RVA: 0x000CAA18 File Offset: 0x000C8C18 public static TextReader In { get { return Console.stdin; } } /// Acquires the standard error stream. /// The standard error stream. /// 1 // Token: 0x06003B7B RID: 15227 RVA: 0x000CAA20 File Offset: 0x000C8C20 public static Stream OpenStandardError() { return Console.OpenStandardError(0); } // Token: 0x06003B7C RID: 15228 RVA: 0x000CAA28 File Offset: 0x000C8C28 private static Stream Open(IntPtr handle, FileAccess access, int bufferSize) { Stream stream; try { stream = new FileStream(handle, access, false, bufferSize, false, bufferSize == 0); } catch (IOException) { stream = new NullStream(); } return stream; } /// Acquires the standard error stream, which is set to a specified buffer size. /// The standard error stream. /// The internal stream buffer size. /// /// is less than or equal to zero. /// 1 // Token: 0x06003B7D RID: 15229 RVA: 0x000CAA7C File Offset: 0x000C8C7C public static Stream OpenStandardError(int bufferSize) { return Console.Open(MonoIO.ConsoleError, FileAccess.Write, bufferSize); } /// Acquires the standard input stream. /// The standard input stream. /// 1 // Token: 0x06003B7E RID: 15230 RVA: 0x000CAA8C File Offset: 0x000C8C8C public static Stream OpenStandardInput() { return Console.OpenStandardInput(0); } /// Acquires the standard input stream, which is set to a specified buffer size. /// The standard input stream. /// The internal stream buffer size. /// /// is less than or equal to zero. /// 1 // Token: 0x06003B7F RID: 15231 RVA: 0x000CAA94 File Offset: 0x000C8C94 public static Stream OpenStandardInput(int bufferSize) { return Console.Open(MonoIO.ConsoleInput, FileAccess.Read, bufferSize); } /// Acquires the standard output stream. /// The standard output stream. /// 1 // Token: 0x06003B80 RID: 15232 RVA: 0x000CAAA4 File Offset: 0x000C8CA4 public static Stream OpenStandardOutput() { return Console.OpenStandardOutput(0); } /// Acquires the standard output stream, which is set to a specified buffer size. /// The standard output stream. /// The internal stream buffer size. /// /// is less than or equal to zero. /// 1 // Token: 0x06003B81 RID: 15233 RVA: 0x000CAAAC File Offset: 0x000C8CAC public static Stream OpenStandardOutput(int bufferSize) { return Console.Open(MonoIO.ConsoleOutput, FileAccess.Write, bufferSize); } /// Sets the property to the specified object. /// A stream that is the new standard error output. /// /// is null. /// The caller does not have the required permission. /// 1 /// /// /// // Token: 0x06003B82 RID: 15234 RVA: 0x000CAABC File Offset: 0x000C8CBC public static void SetError(TextWriter newError) { if (newError == null) { throw new ArgumentNullException("newError"); } Console.stderr = newError; } /// Sets the property to the specified object. /// A stream that is the new standard input. /// /// is null. /// The caller does not have the required permission. /// 1 /// /// /// // Token: 0x06003B83 RID: 15235 RVA: 0x000CAAD8 File Offset: 0x000C8CD8 public static void SetIn(TextReader newIn) { if (newIn == null) { throw new ArgumentNullException("newIn"); } Console.stdin = newIn; } /// Sets the property to the specified object. /// A stream that is the new standard output. /// /// is null. /// The caller does not have the required permission. /// 1 /// /// /// // Token: 0x06003B84 RID: 15236 RVA: 0x000CAAF4 File Offset: 0x000C8CF4 public static void SetOut(TextWriter newOut) { if (newOut == null) { throw new ArgumentNullException("newOut"); } Console.stdout = newOut; } /// Writes the text representation of the specified Boolean value to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B85 RID: 15237 RVA: 0x000CAB10 File Offset: 0x000C8D10 public static void Write(bool value) { Console.stdout.Write(value); } /// Writes the specified Unicode character value to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B86 RID: 15238 RVA: 0x000CAB20 File Offset: 0x000C8D20 public static void Write(char value) { Console.stdout.Write(value); } /// Writes the specified array of Unicode characters to the standard output stream. /// A Unicode character array. /// An I/O error occurred. /// 1 // Token: 0x06003B87 RID: 15239 RVA: 0x000CAB30 File Offset: 0x000C8D30 public static void Write(char[] buffer) { Console.stdout.Write(buffer); } /// Writes the text representation of the specified value to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B88 RID: 15240 RVA: 0x000CAB40 File Offset: 0x000C8D40 public static void Write(decimal value) { Console.stdout.Write(value); } /// Writes the text representation of the specified double-precision floating-point value to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B89 RID: 15241 RVA: 0x000CAB50 File Offset: 0x000C8D50 public static void Write(double value) { Console.stdout.Write(value); } /// Writes the text representation of the specified 32-bit signed integer value to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B8A RID: 15242 RVA: 0x000CAB60 File Offset: 0x000C8D60 public static void Write(int value) { Console.stdout.Write(value); } /// Writes the text representation of the specified 64-bit signed integer value to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B8B RID: 15243 RVA: 0x000CAB70 File Offset: 0x000C8D70 public static void Write(long value) { Console.stdout.Write(value); } /// Writes the text representation of the specified object to the standard output stream. /// The value to write, or null. /// An I/O error occurred. /// 1 // Token: 0x06003B8C RID: 15244 RVA: 0x000CAB80 File Offset: 0x000C8D80 public static void Write(object value) { Console.stdout.Write(value); } /// Writes the text representation of the specified single-precision floating-point value to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B8D RID: 15245 RVA: 0x000CAB90 File Offset: 0x000C8D90 public static void Write(float value) { Console.stdout.Write(value); } /// Writes the specified string value to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B8E RID: 15246 RVA: 0x000CABA0 File Offset: 0x000C8DA0 public static void Write(string value) { Console.stdout.Write(value); } /// Writes the text representation of the specified 32-bit unsigned integer value to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B8F RID: 15247 RVA: 0x000CABB0 File Offset: 0x000C8DB0 [CLSCompliant(false)] public static void Write(uint value) { Console.stdout.Write(value); } /// Writes the text representation of the specified 64-bit unsigned integer value to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B90 RID: 15248 RVA: 0x000CABC0 File Offset: 0x000C8DC0 [CLSCompliant(false)] public static void Write(ulong value) { Console.stdout.Write(value); } /// Writes the text representation of the specified object to the standard output stream using the specified format information. /// A composite format string (see Remarks). /// An object to write using . /// An I/O error occurred. /// /// is null. /// The format specification in is invalid. /// 1 // Token: 0x06003B91 RID: 15249 RVA: 0x000CABD0 File Offset: 0x000C8DD0 public static void Write(string format, object arg0) { Console.stdout.Write(format, arg0); } /// Writes the text representation of the specified array of objects to the standard output stream using the specified format information. /// A composite format string (see Remarks). /// An array of objects to write using . /// An I/O error occurred. /// /// or is null. /// The format specification in is invalid. /// 1 // Token: 0x06003B92 RID: 15250 RVA: 0x000CABE0 File Offset: 0x000C8DE0 public static void Write(string format, params object[] arg) { Console.stdout.Write(format, arg); } /// Writes the specified subarray of Unicode characters to the standard output stream. /// An array of Unicode characters. /// The starting position in . /// The number of characters to write. /// /// is null. /// /// or is less than zero. /// /// plus specify a position that is not within . /// An I/O error occurred. /// 1 // Token: 0x06003B93 RID: 15251 RVA: 0x000CABF0 File Offset: 0x000C8DF0 public static void Write(char[] buffer, int index, int count) { Console.stdout.Write(buffer, index, count); } /// Writes the text representation of the specified objects to the standard output stream using the specified format information. /// A composite format string (see Remarks). /// The first object to write using . /// The second object to write using . /// An I/O error occurred. /// /// is null. /// The format specification in is invalid. /// 1 // Token: 0x06003B94 RID: 15252 RVA: 0x000CAC00 File Offset: 0x000C8E00 public static void Write(string format, object arg0, object arg1) { Console.stdout.Write(format, arg0, arg1); } /// Writes the text representation of the specified objects to the standard output stream using the specified format information. /// A composite format string (see Remarks). /// The first object to write using . /// The second object to write using . /// The third object to write using . /// An I/O error occurred. /// /// is null. /// The format specification in is invalid. /// 1 // Token: 0x06003B95 RID: 15253 RVA: 0x000CAC10 File Offset: 0x000C8E10 public static void Write(string format, object arg0, object arg1, object arg2) { Console.stdout.Write(format, arg0, arg1, arg2); } /// Writes the text representation of the specified objects and variable-length parameter list to the standard output stream using the specified format information. /// A composite format string (see Remarks). /// The first object to write using . /// The second object to write using . /// The third object to write using . /// The fourth object to write using . /// An I/O error occurred. /// /// is null. /// The format specification in is invalid. /// 1 // Token: 0x06003B96 RID: 15254 RVA: 0x000CAC20 File Offset: 0x000C8E20 [CLSCompliant(false)] public static void Write(string format, object arg0, object arg1, object arg2, object arg3, __arglist) { ArgIterator argIterator = new ArgIterator(__arglist); int remainingCount = argIterator.GetRemainingCount(); object[] array = new object[remainingCount + 4]; array[0] = arg0; array[1] = arg1; array[2] = arg2; array[3] = arg3; for (int i = 0; i < remainingCount; i++) { TypedReference nextArg = argIterator.GetNextArg(); array[i + 4] = TypedReference.ToObject(nextArg); } Console.stdout.Write(string.Format(format, array)); } /// Writes the current line terminator to the standard output stream. /// An I/O error occurred. /// 1 // Token: 0x06003B97 RID: 15255 RVA: 0x000CAC90 File Offset: 0x000C8E90 public static void WriteLine() { Console.stdout.WriteLine(); } /// Writes the text representation of the specified Boolean value, followed by the current line terminator, to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B98 RID: 15256 RVA: 0x000CAC9C File Offset: 0x000C8E9C public static void WriteLine(bool value) { Console.stdout.WriteLine(value); } /// Writes the specified Unicode character, followed by the current line terminator, value to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B99 RID: 15257 RVA: 0x000CACAC File Offset: 0x000C8EAC public static void WriteLine(char value) { Console.stdout.WriteLine(value); } /// Writes the specified array of Unicode characters, followed by the current line terminator, to the standard output stream. /// A Unicode character array. /// An I/O error occurred. /// 1 // Token: 0x06003B9A RID: 15258 RVA: 0x000CACBC File Offset: 0x000C8EBC public static void WriteLine(char[] buffer) { Console.stdout.WriteLine(buffer); } /// Writes the text representation of the specified value, followed by the current line terminator, to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B9B RID: 15259 RVA: 0x000CACCC File Offset: 0x000C8ECC public static void WriteLine(decimal value) { Console.stdout.WriteLine(value); } /// Writes the text representation of the specified double-precision floating-point value, followed by the current line terminator, to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B9C RID: 15260 RVA: 0x000CACDC File Offset: 0x000C8EDC public static void WriteLine(double value) { Console.stdout.WriteLine(value); } /// Writes the text representation of the specified 32-bit signed integer value, followed by the current line terminator, to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B9D RID: 15261 RVA: 0x000CACEC File Offset: 0x000C8EEC public static void WriteLine(int value) { Console.stdout.WriteLine(value); } /// Writes the text representation of the specified 64-bit signed integer value, followed by the current line terminator, to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B9E RID: 15262 RVA: 0x000CACFC File Offset: 0x000C8EFC public static void WriteLine(long value) { Console.stdout.WriteLine(value); } /// Writes the text representation of the specified object, followed by the current line terminator, to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003B9F RID: 15263 RVA: 0x000CAD0C File Offset: 0x000C8F0C public static void WriteLine(object value) { Console.stdout.WriteLine(value); } /// Writes the text representation of the specified single-precision floating-point value, followed by the current line terminator, to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003BA0 RID: 15264 RVA: 0x000CAD1C File Offset: 0x000C8F1C public static void WriteLine(float value) { Console.stdout.WriteLine(value); } /// Writes the specified string value, followed by the current line terminator, to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003BA1 RID: 15265 RVA: 0x000CAD2C File Offset: 0x000C8F2C public static void WriteLine(string value) { Console.stdout.WriteLine(value); } /// Writes the text representation of the specified 32-bit unsigned integer value, followed by the current line terminator, to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003BA2 RID: 15266 RVA: 0x000CAD3C File Offset: 0x000C8F3C [CLSCompliant(false)] public static void WriteLine(uint value) { Console.stdout.WriteLine(value); } /// Writes the text representation of the specified 64-bit unsigned integer value, followed by the current line terminator, to the standard output stream. /// The value to write. /// An I/O error occurred. /// 1 // Token: 0x06003BA3 RID: 15267 RVA: 0x000CAD4C File Offset: 0x000C8F4C [CLSCompliant(false)] public static void WriteLine(ulong value) { Console.stdout.WriteLine(value); } /// Writes the text representation of the specified object, followed by the current line terminator, to the standard output stream using the specified format information. /// A composite format string (see Remarks). /// An object to write using . /// An I/O error occurred. /// /// is null. /// The format specification in is invalid. /// 1 // Token: 0x06003BA4 RID: 15268 RVA: 0x000CAD5C File Offset: 0x000C8F5C public static void WriteLine(string format, object arg0) { Console.stdout.WriteLine(format, arg0); } /// Writes the text representation of the specified array of objects, followed by the current line terminator, to the standard output stream using the specified format information. /// A composite format string (see Remarks). /// An array of objects to write using . /// An I/O error occurred. /// /// or is null. /// The format specification in is invalid. /// 1 // Token: 0x06003BA5 RID: 15269 RVA: 0x000CAD6C File Offset: 0x000C8F6C public static void WriteLine(string format, params object[] arg) { Console.stdout.WriteLine(format, arg); } /// Writes the specified subarray of Unicode characters, followed by the current line terminator, to the standard output stream. /// An array of Unicode characters. /// The starting position in . /// The number of characters to write. /// /// is null. /// /// or is less than zero. /// /// plus specify a position that is not within . /// An I/O error occurred. /// 1 // Token: 0x06003BA6 RID: 15270 RVA: 0x000CAD7C File Offset: 0x000C8F7C public static void WriteLine(char[] buffer, int index, int count) { Console.stdout.WriteLine(buffer, index, count); } /// Writes the text representation of the specified objects, followed by the current line terminator, to the standard output stream using the specified format information. /// A composite format string (see Remarks). /// The first object to write using . /// The second object to write using . /// An I/O error occurred. /// /// is null. /// The format specification in is invalid. /// 1 // Token: 0x06003BA7 RID: 15271 RVA: 0x000CAD8C File Offset: 0x000C8F8C public static void WriteLine(string format, object arg0, object arg1) { Console.stdout.WriteLine(format, arg0, arg1); } /// Writes the text representation of the specified objects, followed by the current line terminator, to the standard output stream using the specified format information. /// A composite format string (see Remarks). /// The first object to write using . /// The second object to write using . /// The third object to write using . /// An I/O error occurred. /// /// is null. /// The format specification in is invalid. /// 1 // Token: 0x06003BA8 RID: 15272 RVA: 0x000CAD9C File Offset: 0x000C8F9C public static void WriteLine(string format, object arg0, object arg1, object arg2) { Console.stdout.WriteLine(format, arg0, arg1, arg2); } /// Writes the text representation of the specified objects and variable-length parameter list, followed by the current line terminator, to the standard output stream using the specified format information. /// A composite format string (see Remarks). /// The first object to write using . /// The second object to write using . /// The third object to write using . /// The fourth object to write using . /// An I/O error occurred. /// /// is null. /// The format specification in is invalid. /// 1 // Token: 0x06003BA9 RID: 15273 RVA: 0x000CADAC File Offset: 0x000C8FAC [CLSCompliant(false)] public static void WriteLine(string format, object arg0, object arg1, object arg2, object arg3, __arglist) { ArgIterator argIterator = new ArgIterator(__arglist); int remainingCount = argIterator.GetRemainingCount(); object[] array = new object[remainingCount + 4]; array[0] = arg0; array[1] = arg1; array[2] = arg2; array[3] = arg3; for (int i = 0; i < remainingCount; i++) { TypedReference nextArg = argIterator.GetNextArg(); array[i + 4] = TypedReference.ToObject(nextArg); } Console.stdout.WriteLine(string.Format(format, array)); } /// Reads the next character from the standard input stream. /// The next character from the input stream, or negative one (-1) if there are currently no more characters to be read. /// An I/O error occurred. /// 1 // Token: 0x06003BAA RID: 15274 RVA: 0x000CAE1C File Offset: 0x000C901C public static int Read() { return Console.stdin.Read(); } /// Reads the next line of characters from the standard input stream. /// The next line of characters from the input stream, or null if no more lines are available. /// An I/O error occurred. /// There is insufficient memory to allocate a buffer for the returned string. /// The number of characters in the next line of characters is greater than . /// 1 // Token: 0x06003BAB RID: 15275 RVA: 0x000CAE28 File Offset: 0x000C9028 public static string ReadLine() { return Console.stdin.ReadLine(); } /// Gets or sets the encoding the console uses to read input. /// The encoding used to read console input. /// The property value in a set operation is null. /// This property's set operation is not supported on Windows 98, Windows 98 Second Edition, or Windows Millennium Edition. /// An error occurred during the execution of this operation. /// Your application does not have permission to perform this operation. /// 1 // Token: 0x17000B60 RID: 2912 // (get) Token: 0x06003BAC RID: 15276 RVA: 0x000CAE34 File Offset: 0x000C9034 // (set) Token: 0x06003BAD RID: 15277 RVA: 0x000CAE3C File Offset: 0x000C903C public static Encoding InputEncoding { get { return Console.inputEncoding; } set { Console.inputEncoding = value; Console.SetEncodings(Console.inputEncoding, Console.outputEncoding); } } /// Gets or sets the encoding the console uses to write output. /// The encoding used to write console output. /// The property value in a set operation is null. /// This property's set operation is not supported on Windows 98, Windows 98 Second Edition, or Windows Millennium Edition. /// An error occurred during the execution of this operation. /// Your application does not have permission to perform this operation. /// 1 // Token: 0x17000B61 RID: 2913 // (get) Token: 0x06003BAE RID: 15278 RVA: 0x000CAE54 File Offset: 0x000C9054 // (set) Token: 0x06003BAF RID: 15279 RVA: 0x000CAE5C File Offset: 0x000C905C public static Encoding OutputEncoding { get { return Console.outputEncoding; } set { Console.outputEncoding = value; Console.SetEncodings(Console.inputEncoding, Console.outputEncoding); } } // Token: 0x040017C9 RID: 6089 internal static TextWriter stdout; // Token: 0x040017CA RID: 6090 private static TextWriter stderr; // Token: 0x040017CB RID: 6091 private static TextReader stdin; // Token: 0x040017CC RID: 6092 private static Encoding inputEncoding; // Token: 0x040017CD RID: 6093 private static Encoding outputEncoding; } }