FakeConsole.cs 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749
  1. //
  2. // FakeConsole.cs: A fake .NET Windows Console API implementation for unit tests.
  3. //
  4. namespace Terminal.Gui.Drivers;
  5. #pragma warning disable RCS1138 // Add summary to documentation comment.
  6. /// <summary>
  7. /// Static mock console implementation that simulates the .NET Console API for testing purposes.
  8. /// Used by <see cref="FakeDriver"/> to provide input/output simulation without requiring a real terminal.
  9. /// </summary>
  10. /// <remarks>
  11. /// <para>
  12. /// <see cref="FakeConsole"/> provides static properties and methods that mirror the standard
  13. /// <see cref="System.Console"/> API. It maintains internal state for window size, cursor position,
  14. /// colors, and buffered input/output.
  15. /// </para>
  16. /// <para>
  17. /// <strong>Key Capabilities:</strong>
  18. /// </para>
  19. /// <list type="bullet">
  20. /// <item>Simulating keyboard input via <see cref="PushMockKeyPress"/></item>
  21. /// <item>Tracking cursor position and visibility</item>
  22. /// <item>Managing console colors (foreground/background)</item>
  23. /// <item>Simulating window and buffer size operations</item>
  24. /// <item>Recording output for verification</item>
  25. /// </list>
  26. /// <para>
  27. /// <strong>Thread Safety:</strong> This class maintains static state and is not thread-safe.
  28. /// Tests should not run in parallel if they access FakeConsole.
  29. /// </para>
  30. /// <para>
  31. /// <strong>Usage:</strong> Most tests don't need to interact with FakeConsole directly.
  32. /// <see cref="FakeDriver"/> uses it internally, and <see cref="AutoInitShutdownAttribute"/>
  33. /// handles setup/teardown. However, tests can use <see cref="PushMockKeyPress"/> to
  34. /// simulate keyboard input.
  35. /// </para>
  36. /// </remarks>
  37. /// <example>
  38. /// <code>
  39. /// // Simulate keyboard input
  40. /// FakeConsole.PushMockKeyPress(new ConsoleKeyInfo('a', ConsoleKey.A, false, false, false));
  41. /// FakeConsole.PushMockKeyPress(new ConsoleKeyInfo('\r', ConsoleKey.Enter, false, false, false));
  42. ///
  43. /// // The input will be processed by FakeDriver when Application.Run or RunIteration is called
  44. /// </code>
  45. /// </example>
  46. /// <seealso cref="FakeDriver"/>
  47. /// <seealso cref="AutoInitShutdownAttribute"/>
  48. public static class FakeConsole
  49. {
  50. #pragma warning restore RCS1138 // Add summary to documentation comment.
  51. //
  52. // Summary:
  53. // Gets or sets the width of the console window.
  54. //
  55. // Returns:
  56. // The width of the console window measured in columns.
  57. //
  58. // Exceptions:
  59. // T:System.ArgumentOutOfRangeException:
  60. // The value of the System.Console.WindowWidth property or the value of the System.Console.WindowHeight
  61. // property is less than or equal to 0.-or-The value of the System.Console.WindowHeight
  62. // property plus the value of the System.Console.WindowTop property is greater than
  63. // or equal to System.Int16.MaxValue.-or-The value of the System.Console.WindowWidth
  64. // property or the value of the System.Console.WindowHeight property is greater
  65. // than the largest possible window width or height for the current screen resolution
  66. // and console font.
  67. //
  68. // T:System.IO.IOException:
  69. // Error reading or writing information.
  70. #pragma warning disable RCS1138 // Add summary to documentation comment.
  71. /// <summary>Specifies the initial console width.</summary>
  72. public const int WIDTH = 80;
  73. /// <summary>Specifies the initial console height.</summary>
  74. public const int HEIGHT = 25;
  75. /// <summary></summary>
  76. public static int WindowWidth { get; set; } = WIDTH;
  77. //
  78. // Summary:
  79. // Gets a value that indicates whether output has been redirected from the standard
  80. // output stream.
  81. //
  82. // Returns:
  83. // true if output is redirected; otherwise, false.
  84. /// <summary></summary>
  85. public static bool IsOutputRedirected { get; }
  86. //
  87. // Summary:
  88. // Gets a value that indicates whether the error output stream has been redirected
  89. // from the standard error stream.
  90. //
  91. // Returns:
  92. // true if error output is redirected; otherwise, false.
  93. /// <summary></summary>
  94. public static bool IsErrorRedirected { get; }
  95. //
  96. // Summary:
  97. // Gets the standard input stream.
  98. //
  99. // Returns:
  100. // A System.IO.TextReader that represents the standard input stream.
  101. /// <summary></summary>
  102. public static TextReader In { get; }
  103. //
  104. // Summary:
  105. // Gets the standard output stream.
  106. //
  107. // Returns:
  108. // A System.IO.TextWriter that represents the standard output stream.
  109. /// <summary></summary>
  110. public static TextWriter Out { get; }
  111. //
  112. // Summary:
  113. // Gets the standard error output stream.
  114. //
  115. // Returns:
  116. // A System.IO.TextWriter that represents the standard error output stream.
  117. /// <summary></summary>
  118. public static TextWriter Error { get; }
  119. //
  120. // Summary:
  121. // Gets or sets the encoding the console uses to read input.
  122. //
  123. // Returns:
  124. // The encoding used to read console input.
  125. //
  126. // Exceptions:
  127. // T:System.ArgumentNullException:
  128. // The property value in a set operation is null.
  129. //
  130. // T:System.IO.IOException:
  131. // An error occurred during the execution of this operation.
  132. //
  133. // T:System.Security.SecurityException:
  134. // Your application does not have permission to perform this operation.
  135. /// <summary></summary>
  136. public static Encoding InputEncoding { get; set; }
  137. //
  138. // Summary:
  139. // Gets or sets the encoding the console uses to write output.
  140. //
  141. // Returns:
  142. // The encoding used to write console output.
  143. //
  144. // Exceptions:
  145. // T:System.ArgumentNullException:
  146. // The property value in a set operation is null.
  147. //
  148. // T:System.IO.IOException:
  149. // An error occurred during the execution of this operation.
  150. //
  151. // T:System.Security.SecurityException:
  152. // Your application does not have permission to perform this operation.
  153. /// <summary></summary>
  154. public static Encoding OutputEncoding { get; set; }
  155. //
  156. // Summary:
  157. // Gets or sets the background color of the console.
  158. //
  159. // Returns:
  160. // A value that specifies the background color of the console; that is, the color
  161. // that appears behind each character. The default is black.
  162. //
  163. // Exceptions:
  164. // T:System.ArgumentException:
  165. // The color specified in a set operation is not a valid member of System.ConsoleColor.
  166. //
  167. // T:System.Security.SecurityException:
  168. // The user does not have permission to perform this action.
  169. //
  170. // T:System.IO.IOException:
  171. // An I/O error occurred.
  172. private static readonly ConsoleColor _defaultBackgroundColor = ConsoleColor.Black;
  173. /// <summary></summary>
  174. public static ConsoleColor BackgroundColor { get; set; } = _defaultBackgroundColor;
  175. //
  176. // Summary:
  177. // Gets or sets the foreground color of the console.
  178. //
  179. // Returns:
  180. // A System.ConsoleColor that specifies the foreground color of the console; that
  181. // is, the color of each character that is displayed. The default is gray.
  182. //
  183. // Exceptions:
  184. // T:System.ArgumentException:
  185. // The color specified in a set operation is not a valid member of System.ConsoleColor.
  186. //
  187. // T:System.Security.SecurityException:
  188. // The user does not have permission to perform this action.
  189. //
  190. // T:System.IO.IOException:
  191. // An I/O error occurred.
  192. private static readonly ConsoleColor _defaultForegroundColor = ConsoleColor.Gray;
  193. /// <summary></summary>
  194. public static ConsoleColor ForegroundColor { get; set; } = _defaultForegroundColor;
  195. //
  196. // Summary:
  197. // Gets or sets the height of the buffer area.
  198. //
  199. // Returns:
  200. // The current height, in rows, of the buffer area.
  201. //
  202. // Exceptions:
  203. // T:System.ArgumentOutOfRangeException:
  204. // The value in a set operation is less than or equal to zero.-or- The value in
  205. // a set operation is greater than or equal to System.Int16.MaxValue.-or- The value
  206. // in a set operation is less than System.Console.WindowTop + System.Console.WindowHeight.
  207. //
  208. // T:System.Security.SecurityException:
  209. // The user does not have permission to perform this action.
  210. //
  211. // T:System.IO.IOException:
  212. // An I/O error occurred.
  213. /// <summary></summary>
  214. public static int BufferHeight { get; set; } = HEIGHT;
  215. //
  216. // Summary:
  217. // Gets or sets the width of the buffer area.
  218. //
  219. // Returns:
  220. // The current width, in columns, of the buffer area.
  221. //
  222. // Exceptions:
  223. // T:System.ArgumentOutOfRangeException:
  224. // The value in a set operation is less than or equal to zero.-or- The value in
  225. // a set operation is greater than or equal to System.Int16.MaxValue.-or- The value
  226. // in a set operation is less than System.Console.WindowLeft + System.Console.WindowWidth.
  227. //
  228. // T:System.Security.SecurityException:
  229. // The user does not have permission to perform this action.
  230. //
  231. // T:System.IO.IOException:
  232. // An I/O error occurred.
  233. /// <summary></summary>
  234. public static int BufferWidth { get; set; } = WIDTH;
  235. //
  236. // Summary:
  237. // Gets or sets the height of the console window area.
  238. //
  239. // Returns:
  240. // The height of the console window measured in rows.
  241. //
  242. // Exceptions:
  243. // T:System.ArgumentOutOfRangeException:
  244. // The value of the System.Console.WindowWidth property or the value of the System.Console.WindowHeight
  245. // property is less than or equal to 0.-or-The value of the System.Console.WindowHeight
  246. // property plus the value of the System.Console.WindowTop property is greater than
  247. // or equal to System.Int16.MaxValue.-or-The value of the System.Console.WindowWidth
  248. // property or the value of the System.Console.WindowHeight property is greater
  249. // than the largest possible window width or height for the current screen resolution
  250. // and console font.
  251. //
  252. // T:System.IO.IOException:
  253. // Error reading or writing information.
  254. /// <summary></summary>
  255. public static int WindowHeight { get; set; } = HEIGHT;
  256. //
  257. // Summary:
  258. // Gets or sets a value indicating whether the combination of the System.ConsoleModifiers.Control
  259. // modifier key and System.ConsoleKey.C console key (Ctrl+C) is treated as ordinary
  260. // input or as an interruption that is handled by the operating system.
  261. //
  262. // Returns:
  263. // true if Ctrl+C is treated as ordinary input; otherwise, false.
  264. //
  265. // Exceptions:
  266. // T:System.IO.IOException:
  267. // Unable to get or set the input mode of the console input buffer.
  268. /// <summary></summary>
  269. public static bool TreatControlCAsInput { get; set; }
  270. //
  271. // Summary:
  272. // Gets the largest possible number of console window columns, based on the current
  273. // font and screen resolution.
  274. //
  275. // Returns:
  276. // The width of the largest possible console window measured in columns.
  277. /// <summary></summary>
  278. public static int LargestWindowWidth { get; }
  279. //
  280. // Summary:
  281. // Gets the largest possible number of console window rows, based on the current
  282. // font and screen resolution.
  283. //
  284. // Returns:
  285. // The height of the largest possible console window measured in rows.
  286. /// <summary></summary>
  287. public static int LargestWindowHeight { get; }
  288. //
  289. // Summary:
  290. // Gets or sets the leftmost position of the console window area relative to the
  291. // screen buffer.
  292. //
  293. // Returns:
  294. // The leftmost console window position measured in columns.
  295. //
  296. // Exceptions:
  297. // T:System.ArgumentOutOfRangeException:
  298. // In a set operation, the value to be assigned is less than zero.-or-As a result
  299. // of the assignment, System.Console.WindowLeft plus System.Console.WindowWidth
  300. // would exceed System.Console.BufferWidth.
  301. //
  302. // T:System.IO.IOException:
  303. // Error reading or writing information.
  304. /// <summary></summary>
  305. public static int WindowLeft { get; set; }
  306. //
  307. // Summary:
  308. // Gets or sets the top position of the console window area relative to the screen
  309. // buffer.
  310. //
  311. // Returns:
  312. // The uppermost console window position measured in rows.
  313. //
  314. // Exceptions:
  315. // T:System.ArgumentOutOfRangeException:
  316. // In a set operation, the value to be assigned is less than zero.-or-As a result
  317. // of the assignment, System.Console.WindowTop plus System.Console.WindowHeight
  318. // would exceed System.Console.BufferHeight.
  319. //
  320. // T:System.IO.IOException:
  321. // Error reading or writing information.
  322. /// <summary></summary>
  323. public static int WindowTop { get; set; }
  324. //
  325. // Summary:
  326. // Gets or sets the column position of the cursor within the buffer area.
  327. //
  328. // Returns:
  329. // The current position, in columns, of the cursor.
  330. //
  331. // Exceptions:
  332. // T:System.ArgumentOutOfRangeException:
  333. // The value in a set operation is less than zero.-or- The value in a set operation
  334. // is greater than or equal to System.Console.BufferWidth.
  335. //
  336. // T:System.Security.SecurityException:
  337. // The user does not have permission to perform this action.
  338. //
  339. // T:System.IO.IOException:
  340. // An I/O error occurred.
  341. /// <summary></summary>
  342. public static int CursorLeft { get; set; }
  343. //
  344. // Summary:
  345. // Gets or sets the row position of the cursor within the buffer area.
  346. //
  347. // Returns:
  348. // The current position, in rows, of the cursor.
  349. //
  350. // Exceptions:
  351. // T:System.ArgumentOutOfRangeException:
  352. // The value in a set operation is less than zero.-or- The value in a set operation
  353. // is greater than or equal to System.Console.BufferHeight.
  354. //
  355. // T:System.Security.SecurityException:
  356. // The user does not have permission to perform this action.
  357. //
  358. // T:System.IO.IOException:
  359. // An I/O error occurred.
  360. /// <summary></summary>
  361. public static int CursorTop { get; set; }
  362. //
  363. // Summary:
  364. // Gets or sets the height of the cursor within a character cell.
  365. //
  366. // Returns:
  367. // The size of the cursor expressed as a percentage of the height of a character
  368. // cell. The property value ranges from 1 to 100.
  369. //
  370. // Exceptions:
  371. // T:System.ArgumentOutOfRangeException:
  372. // The value specified in a set operation is less than 1 or greater than 100.
  373. //
  374. // T:System.Security.SecurityException:
  375. // The user does not have permission to perform this action.
  376. //
  377. // T:System.IO.IOException:
  378. // An I/O error occurred.
  379. /// <summary></summary>
  380. public static int CursorSize { get; set; }
  381. //
  382. // Summary:
  383. // Gets or sets a value indicating whether the cursor is visible.
  384. //
  385. // Returns:
  386. // true if the cursor is visible; otherwise, false.
  387. //
  388. // Exceptions:
  389. // T:System.Security.SecurityException:
  390. // The user does not have permission to perform this action.
  391. //
  392. // T:System.IO.IOException:
  393. // An I/O error occurred.
  394. /// <summary></summary>
  395. public static bool CursorVisible { get; set; }
  396. //
  397. // Summary:
  398. // Gets or sets the title to display in the console title bar.
  399. //
  400. // Returns:
  401. // The string to be displayed in the title bar of the console. The maximum length
  402. // of the title string is 24500 characters.
  403. //
  404. // Exceptions:
  405. // T:System.InvalidOperationException:
  406. // In a get operation, the retrieved title is longer than 24500 characters.
  407. //
  408. // T:System.ArgumentOutOfRangeException:
  409. // In a set operation, the specified title is longer than 24500 characters.
  410. //
  411. // T:System.ArgumentNullException:
  412. // In a set operation, the specified title is null.
  413. //
  414. // T:System.IO.IOException:
  415. // An I/O error occurred.
  416. /// <summary></summary>
  417. public static string Title { get; set; }
  418. //
  419. // Summary:
  420. // Gets a value indicating whether a key press is available in the input stream.
  421. //
  422. // Returns:
  423. // true if a key press is available; otherwise, false.
  424. //
  425. // Exceptions:
  426. // T:System.IO.IOException:
  427. // An I/O error occurred.
  428. //
  429. // T:System.InvalidOperationException:
  430. // Standard input is redirected to a file instead of the keyboard.
  431. /// <summary></summary>
  432. public static bool KeyAvailable { get; }
  433. //
  434. // Summary:
  435. // Gets a value that indicates whether input has been redirected from the standard
  436. // input stream.
  437. //
  438. // Returns:
  439. // true if input is redirected; otherwise, false.
  440. /// <summary></summary>
  441. public static bool IsInputRedirected { get; }
  442. //
  443. // Summary:
  444. // Plays the sound of a beep through the console speaker.
  445. //
  446. // Exceptions:
  447. // T:System.Security.HostProtectionException:
  448. // This method was executed on a server, such as SQL Server, that does not permit
  449. // access to a user interface.
  450. /// <summary></summary>
  451. public static void Beep () { throw new NotImplementedException (); }
  452. //
  453. // Summary:
  454. // Plays the sound of a beep of a specified frequency and duration through the console
  455. // speaker.
  456. //
  457. // Parameters:
  458. // frequency:
  459. // The frequency of the beep, ranging from 37 to 32767 hertz.
  460. //
  461. // duration:
  462. // The duration of the beep measured in milliseconds.
  463. //
  464. // Exceptions:
  465. // T:System.ArgumentOutOfRangeException:
  466. // frequency is less than 37 or more than 32767 hertz.-or- duration is less than
  467. // or equal to zero.
  468. //
  469. // T:System.Security.HostProtectionException:
  470. // This method was executed on a server, such as SQL Server, that does not permit
  471. // access to the console.
  472. /// <summary></summary>
  473. public static void Beep (int frequency, int duration) { throw new NotImplementedException (); }
  474. //
  475. // Summary:
  476. // Clears the console buffer and corresponding console window of display information.
  477. //
  478. // Exceptions:
  479. // T:System.IO.IOException:
  480. // An I/O error occurred.
  481. private static char [,] _buffer = new char [WindowWidth, WindowHeight];
  482. /// <summary></summary>
  483. public static void Clear ()
  484. {
  485. _buffer = new char [BufferWidth, BufferHeight];
  486. SetCursorPosition (0, 0);
  487. }
  488. //
  489. // Summary:
  490. // Copies a specified source area of the screen buffer to a specified destination
  491. // area.
  492. //
  493. // Parameters:
  494. // sourceLeft:
  495. // The leftmost column of the source area.
  496. //
  497. // sourceTop:
  498. // The topmost row of the source area.
  499. //
  500. // sourceWidth:
  501. // The number of columns in the source area.
  502. //
  503. // sourceHeight:
  504. // The number of rows in the source area.
  505. //
  506. // targetLeft:
  507. // The leftmost column of the destination area.
  508. //
  509. // targetTop:
  510. // The topmost row of the destination area.
  511. //
  512. // Exceptions:
  513. // T:System.ArgumentOutOfRangeException:
  514. // One or more of the parameters is less than zero.-or- sourceLeft or targetLeft
  515. // is greater than or equal to System.Console.BufferWidth.-or- sourceTop or targetTop
  516. // is greater than or equal to System.Console.BufferHeight.-or- sourceTop + sourceHeight
  517. // is greater than or equal to System.Console.BufferHeight.-or- sourceLeft + sourceWidth
  518. // is greater than or equal to System.Console.BufferWidth.
  519. //
  520. // T:System.Security.SecurityException:
  521. // The user does not have permission to perform this action.
  522. //
  523. // T:System.IO.IOException:
  524. // An I/O error occurred.
  525. /// <summary></summary>
  526. public static void MoveBufferArea (
  527. int sourceLeft,
  528. int sourceTop,
  529. int sourceWidth,
  530. int sourceHeight,
  531. int targetLeft,
  532. int targetTop
  533. )
  534. {
  535. throw new NotImplementedException ();
  536. }
  537. //
  538. // Summary:
  539. // Copies a specified source area of the screen buffer to a specified destination
  540. // area.
  541. //
  542. // Parameters:
  543. // sourceLeft:
  544. // The leftmost column of the source area.
  545. //
  546. // sourceTop:
  547. // The topmost row of the source area.
  548. //
  549. // sourceWidth:
  550. // The number of columns in the source area.
  551. //
  552. // sourceHeight:
  553. // The number of rows in the source area.
  554. //
  555. // targetLeft:
  556. // The leftmost column of the destination area.
  557. //
  558. // targetTop:
  559. // The topmost row of the destination area.
  560. //
  561. // sourceChar:
  562. // The character used to fill the source area.
  563. //
  564. // sourceForeColor:
  565. // The foreground color used to fill the source area.
  566. //
  567. // sourceBackColor:
  568. // The background color used to fill the source area.
  569. //
  570. // Exceptions:
  571. // T:System.ArgumentOutOfRangeException:
  572. // One or more of the parameters is less than zero.-or- sourceLeft or targetLeft
  573. // is greater than or equal to System.Console.BufferWidth.-or- sourceTop or targetTop
  574. // is greater than or equal to System.Console.BufferHeight.-or- sourceTop + sourceHeight
  575. // is greater than or equal to System.Console.BufferHeight.-or- sourceLeft + sourceWidth
  576. // is greater than or equal to System.Console.BufferWidth.
  577. //
  578. // T:System.ArgumentException:
  579. // One or both of the color parameters is not a member of the System.ConsoleColor
  580. // enumeration.
  581. //
  582. // T:System.Security.SecurityException:
  583. // The user does not have permission to perform this action.
  584. //
  585. // T:System.IO.IOException:
  586. // An I/O error occurred.
  587. //[SecuritySafeCritical]
  588. /// <summary></summary>
  589. public static void MoveBufferArea (
  590. int sourceLeft,
  591. int sourceTop,
  592. int sourceWidth,
  593. int sourceHeight,
  594. int targetLeft,
  595. int targetTop,
  596. char sourceChar,
  597. ConsoleColor sourceForeColor,
  598. ConsoleColor sourceBackColor
  599. )
  600. {
  601. throw new NotImplementedException ();
  602. }
  603. //
  604. // Summary:
  605. // Acquires the standard error stream.
  606. //
  607. // Returns:
  608. // The standard error stream.
  609. /// <summary></summary>
  610. public static Stream OpenStandardError () { throw new NotImplementedException (); }
  611. //
  612. // Summary:
  613. // Acquires the standard error stream, which is set to a specified buffer size.
  614. //
  615. // Parameters:
  616. // bufferSize:
  617. // The internal stream buffer size.
  618. //
  619. // Returns:
  620. // The standard error stream.
  621. //
  622. // Exceptions:
  623. // T:System.ArgumentOutOfRangeException:
  624. // bufferSize is less than or equal to zero.
  625. /// <summary></summary>
  626. public static Stream OpenStandardError (int bufferSize) { throw new NotImplementedException (); }
  627. //
  628. // Summary:
  629. // Acquires the standard input stream, which is set to a specified buffer size.
  630. //
  631. // Parameters:
  632. // bufferSize:
  633. // The internal stream buffer size.
  634. //
  635. // Returns:
  636. // The standard input stream.
  637. //
  638. // Exceptions:
  639. // T:System.ArgumentOutOfRangeException:
  640. // bufferSize is less than or equal to zero.
  641. /// <summary></summary>
  642. public static Stream OpenStandardInput (int bufferSize) { throw new NotImplementedException (); }
  643. //
  644. // Summary:
  645. // Acquires the standard input stream.
  646. //
  647. // Returns:
  648. // The standard input stream.
  649. /// <summary></summary>
  650. public static Stream OpenStandardInput () { throw new NotImplementedException (); }
  651. //
  652. // Summary:
  653. // Acquires the standard output stream, which is set to a specified buffer size.
  654. //
  655. // Parameters:
  656. // bufferSize:
  657. // The internal stream buffer size.
  658. //
  659. // Returns:
  660. // The standard output stream.
  661. //
  662. // Exceptions:
  663. // T:System.ArgumentOutOfRangeException:
  664. // bufferSize is less than or equal to zero.
  665. /// <summary></summary>
  666. public static Stream OpenStandardOutput (int bufferSize) { throw new NotImplementedException (); }
  667. //
  668. // Summary:
  669. // Acquires the standard output stream.
  670. //
  671. // Returns:
  672. // The standard output stream.
  673. /// <summary></summary>
  674. public static Stream OpenStandardOutput () { throw new NotImplementedException (); }
  675. //
  676. // Summary:
  677. // Reads the next character from the standard input stream.
  678. //
  679. // Returns:
  680. // The next character from the input stream, or negative one (-1) if there are currently
  681. // no more characters to be read.
  682. //
  683. // Exceptions:
  684. // T:System.IO.IOException:
  685. // An I/O error occurred.
  686. /// <summary></summary>
  687. public static int Read () { throw new NotImplementedException (); }
  688. //
  689. // Summary:
  690. // Obtains the next character or function key pressed by the user. The pressed key
  691. // is optionally displayed in the console window.
  692. //
  693. // Parameters:
  694. // intercept:
  695. // Determines whether to display the pressed key in the console window. true to
  696. // not display the pressed key; otherwise, false.
  697. //
  698. // Returns:
  699. // An object that describes the System.ConsoleKey constant and Unicode character,
  700. // if any, that correspond to the pressed console key. The System.ConsoleKeyInfo
  701. // object also describes, in a bitwise combination of System.ConsoleModifiers values,
  702. // whether one or more Shift, Alt, or Ctrl modifier keys was pressed simultaneously
  703. // with the console key.
  704. //
  705. // Exceptions:
  706. // T:System.InvalidOperationException:
  707. // The System.Console.In property is redirected from some stream other than the
  708. // console.
  709. //[SecuritySafeCritical]
  710. /// <summary>A stack of keypresses to return when ReadKey is called.</summary>
  711. public static Stack<ConsoleKeyInfo> MockKeyPresses = new ();
  712. /// <summary>Helper to push a <see cref="KeyCode"/> onto <see cref="MockKeyPresses"/>.</summary>
  713. /// <param name="key"></param>
  714. public static void PushMockKeyPress (KeyCode key)
  715. {
  716. MockKeyPresses.Push (
  717. new ConsoleKeyInfo (
  718. (char)(key
  719. & ~KeyCode.CtrlMask
  720. & ~KeyCode.ShiftMask
  721. & ~KeyCode.AltMask),
  722. ConsoleKeyMapping.GetConsoleKeyInfoFromKeyCode (key).Key,
  723. key.HasFlag (KeyCode.ShiftMask),
  724. key.HasFlag (KeyCode.AltMask),
  725. key.HasFlag (KeyCode.CtrlMask)
  726. )
  727. );
  728. }
  729. //
  730. // Summary:
  731. // Obtains the next character or function key pressed by the user. The pressed key
  732. // is displayed in the console window.
  733. //
  734. // Returns:
  735. // An object that describes the System.ConsoleKey constant and Unicode character,
  736. // if any, that correspond to the pressed console key. The System.ConsoleKeyInfo
  737. // object also describes, in a bitwise combination of System.ConsoleModifiers values,
  738. // whether one or more Shift, Alt, or Ctrl modifier keys was pressed simultaneously
  739. // with the console key.
  740. //
  741. // Exceptions:
  742. // T:System.InvalidOperationException:
  743. // The System.Console.In property is redirected from some stream other than the
  744. // console.
  745. /// <summary></summary>
  746. public static ConsoleKeyInfo ReadKey () { throw new NotImplementedException (); }
  747. //
  748. // Summary:
  749. // Reads the next line of characters from the standard input stream.
  750. //
  751. // Returns:
  752. // The next line of characters from the input stream, or null if no more lines are
  753. // available.
  754. //
  755. // Exceptions:
  756. // T:System.IO.IOException:
  757. // An I/O error occurred.
  758. //
  759. // T:System.OutOfMemoryException:
  760. // There is insufficient memory to allocate a buffer for the returned string.
  761. //
  762. // T:System.ArgumentOutOfRangeException:
  763. // The number of characters in the next line of characters is greater than System.Int32.MaxValue.
  764. /// <summary></summary>
  765. public static string ReadLine () { throw new NotImplementedException (); }
  766. //
  767. // Summary:
  768. // Sets the foreground and background console colors to their defaults.
  769. //
  770. // Exceptions:
  771. // T:System.Security.SecurityException:
  772. // The user does not have permission to perform this action.
  773. //
  774. // T:System.IO.IOException:
  775. // An I/O error occurred.
  776. //[SecuritySafeCritical]
  777. /// <summary></summary>
  778. public static void ResetColor ()
  779. {
  780. BackgroundColor = _defaultBackgroundColor;
  781. ForegroundColor = _defaultForegroundColor;
  782. }
  783. //
  784. // Summary:
  785. // Sets the height and width of the screen buffer area to the specified values.
  786. //
  787. // Parameters:
  788. // width:
  789. // The width of the buffer area measured in columns.
  790. //
  791. // height:
  792. // The height of the buffer area measured in rows.
  793. //
  794. // Exceptions:
  795. // T:System.ArgumentOutOfRangeException:
  796. // height or width is less than or equal to zero.-or- height or width is greater
  797. // than or equal to System.Int16.MaxValue.-or- width is less than System.Console.WindowLeft
  798. // + System.Console.WindowWidth.-or- height is less than System.Console.WindowTop
  799. // + System.Console.WindowHeight.
  800. //
  801. // T:System.Security.SecurityException:
  802. // The user does not have permission to perform this action.
  803. //
  804. // T:System.IO.IOException:
  805. // An I/O error occurred.
  806. //[SecuritySafeCritical]
  807. /// <summary></summary>
  808. public static void SetBufferSize (int width, int height)
  809. {
  810. BufferWidth = width;
  811. BufferHeight = height;
  812. _buffer = new char [BufferWidth, BufferHeight];
  813. }
  814. //
  815. // Summary:
  816. // Sets the position of the cursor.
  817. //
  818. // Parameters:
  819. // left:
  820. // The column position of the cursor. Columns are numbered from left to right starting
  821. // at 0.
  822. //
  823. // top:
  824. // The row position of the cursor. Rows are numbered from top to bottom starting
  825. // at 0.
  826. //
  827. // Exceptions:
  828. // T:System.ArgumentOutOfRangeException:
  829. // left or top is less than zero.-or- left is greater than or equal to System.Console.BufferWidth.-or-
  830. // top is greater than or equal to System.Console.BufferHeight.
  831. //
  832. // T:System.Security.SecurityException:
  833. // The user does not have permission to perform this action.
  834. //
  835. // T:System.IO.IOException:
  836. // An I/O error occurred.
  837. //[SecuritySafeCritical]
  838. /// <summary></summary>
  839. public static void SetCursorPosition (int left, int top)
  840. {
  841. CursorLeft = left;
  842. CursorTop = top;
  843. WindowLeft = Math.Max (Math.Min (left, BufferWidth - WindowWidth), 0);
  844. WindowTop = Math.Max (Math.Min (top, BufferHeight - WindowHeight), 0);
  845. }
  846. //
  847. // Summary:
  848. // Sets the System.Console.Error property to the specified System.IO.TextWriter
  849. // object.
  850. //
  851. // Parameters:
  852. // newError:
  853. // A stream that is the new standard error output.
  854. //
  855. // Exceptions:
  856. // T:System.ArgumentNullException:
  857. // newError is null.
  858. //
  859. // T:System.Security.SecurityException:
  860. // The caller does not have the required permission.
  861. //[SecuritySafeCritical]
  862. /// <summary></summary>
  863. public static void SetError (TextWriter newError) { throw new NotImplementedException (); }
  864. //
  865. // Summary:
  866. // Sets the System.Console.In property to the specified System.IO.TextReader object.
  867. //
  868. // Parameters:
  869. // newIn:
  870. // A stream that is the new standard input.
  871. //
  872. // Exceptions:
  873. // T:System.ArgumentNullException:
  874. // newIn is null.
  875. //
  876. // T:System.Security.SecurityException:
  877. // The caller does not have the required permission.
  878. //[SecuritySafeCritical]
  879. /// <summary></summary>
  880. public static void SetIn (TextReader newIn) { throw new NotImplementedException (); }
  881. //
  882. // Summary:
  883. // Sets the System.Console.Out property to the specified System.IO.TextWriter object.
  884. //
  885. // Parameters:
  886. // newOut:
  887. // A stream that is the new standard output.
  888. //
  889. // Exceptions:
  890. // T:System.ArgumentNullException:
  891. // newOut is null.
  892. //
  893. // T:System.Security.SecurityException:
  894. // The caller does not have the required permission.
  895. //[SecuritySafeCritical]
  896. /// <summary></summary>
  897. /// <param name="newOut"></param>
  898. public static void SetOut (TextWriter newOut) { throw new NotImplementedException (); }
  899. //
  900. // Summary:
  901. // Sets the position of the console window relative to the screen buffer.
  902. //
  903. // Parameters:
  904. // left:
  905. // The column position of the upper left corner of the console window.
  906. //
  907. // top:
  908. // The row position of the upper left corner of the console window.
  909. //
  910. // Exceptions:
  911. // T:System.ArgumentOutOfRangeException:
  912. // left or top is less than zero.-or- left + System.Console.WindowWidth is greater
  913. // than System.Console.BufferWidth.-or- top + System.Console.WindowHeight is greater
  914. // than System.Console.BufferHeight.
  915. //
  916. // T:System.Security.SecurityException:
  917. // The user does not have permission to perform this action.
  918. //
  919. // T:System.IO.IOException:
  920. // An I/O error occurred.
  921. //[SecuritySafeCritical]
  922. /// <summary></summary>
  923. /// <param name="left"></param>
  924. /// <param name="top"></param>
  925. public static void SetWindowPosition (int left, int top)
  926. {
  927. WindowLeft = left;
  928. WindowTop = top;
  929. }
  930. //
  931. // Summary:
  932. // Sets the height and width of the console window to the specified values.
  933. //
  934. // Parameters:
  935. // width:
  936. // The width of the console window measured in columns.
  937. //
  938. // height:
  939. // The height of the console window measured in rows.
  940. //
  941. // Exceptions:
  942. // T:System.ArgumentOutOfRangeException:
  943. // width or height is less than or equal to zero.-or- width plus System.Console.WindowLeft
  944. // or height plus System.Console.WindowTop is greater than or equal to System.Int16.MaxValue.
  945. // -or- width or height is greater than the largest possible window width or height
  946. // for the current screen resolution and console font.
  947. //
  948. // T:System.Security.SecurityException:
  949. // The user does not have permission to perform this action.
  950. //
  951. // T:System.IO.IOException:
  952. // An I/O error occurred.
  953. //[SecuritySafeCritical]
  954. /// <summary></summary>
  955. /// <param name="width"></param>
  956. /// <param name="height"></param>
  957. public static void SetWindowSize (int width, int height)
  958. {
  959. WindowWidth = width;
  960. WindowHeight = height;
  961. }
  962. //
  963. // Summary:
  964. // Writes the specified string value to the standard output stream.
  965. //
  966. // Parameters:
  967. // value:
  968. // The value to write.
  969. //
  970. // Exceptions:
  971. // T:System.IO.IOException:
  972. // An I/O error occurred.
  973. /// <summary></summary>
  974. /// <param name="value"></param>
  975. public static void Write (string value) { throw new NotImplementedException (); }
  976. //
  977. // Summary:
  978. // Writes the text representation of the specified object to the standard output
  979. // stream.
  980. //
  981. // Parameters:
  982. // value:
  983. // The value to write, or null.
  984. //
  985. // Exceptions:
  986. // T:System.IO.IOException:
  987. // An I/O error occurred.
  988. /// <summary></summary>
  989. /// <param name="value"></param>
  990. public static void Write (object value)
  991. {
  992. if (value is Rune rune)
  993. {
  994. Write ((char)rune.Value);
  995. }
  996. else
  997. {
  998. throw new NotImplementedException ();
  999. }
  1000. }
  1001. //
  1002. // Summary:
  1003. // Writes the text representation of the specified 64-bit unsigned integer value
  1004. // to the standard output stream.
  1005. //
  1006. // Parameters:
  1007. // value:
  1008. // The value to write.
  1009. //
  1010. // Exceptions:
  1011. // T:System.IO.IOException:
  1012. // An I/O error occurred.
  1013. //[CLSCompliant (false)]
  1014. /// <summary></summary>
  1015. /// <param name="value"></param>
  1016. public static void Write (ulong value) { throw new NotImplementedException (); }
  1017. //
  1018. // Summary:
  1019. // Writes the text representation of the specified 64-bit signed integer value to
  1020. // the standard output stream.
  1021. //
  1022. // Parameters:
  1023. // value:
  1024. // The value to write.
  1025. //
  1026. // Exceptions:
  1027. // T:System.IO.IOException:
  1028. // An I/O error occurred.
  1029. /// <summary></summary>
  1030. /// <param name="value"></param>
  1031. public static void Write (long value) { throw new NotImplementedException (); }
  1032. //
  1033. // Summary:
  1034. // Writes the text representation of the specified objects to the standard output
  1035. // stream using the specified format information.
  1036. //
  1037. // Parameters:
  1038. // format:
  1039. // A composite format string (see Remarks).
  1040. //
  1041. // arg0:
  1042. // The first object to write using format.
  1043. //
  1044. // arg1:
  1045. // The second object to write using format.
  1046. //
  1047. // Exceptions:
  1048. // T:System.IO.IOException:
  1049. // An I/O error occurred.
  1050. //
  1051. // T:System.ArgumentNullException:
  1052. // format is null.
  1053. //
  1054. // T:System.FormatException:
  1055. // The format specification in format is invalid.
  1056. /// <summary></summary>
  1057. /// <param name="format"></param>
  1058. /// <param name="arg0"></param>
  1059. /// <param name="arg1"></param>
  1060. public static void Write (string format, object arg0, object arg1) { throw new NotImplementedException (); }
  1061. //
  1062. // Summary:
  1063. // Writes the text representation of the specified 32-bit signed integer value to
  1064. // the standard output stream.
  1065. //
  1066. // Parameters:
  1067. // value:
  1068. // The value to write.
  1069. //
  1070. // Exceptions:
  1071. // T:System.IO.IOException:
  1072. // An I/O error occurred.
  1073. /// <summary></summary>
  1074. /// <param name="value"></param>
  1075. public static void Write (int value) { throw new NotImplementedException (); }
  1076. //
  1077. // Summary:
  1078. // Writes the text representation of the specified object to the standard output
  1079. // stream using the specified format information.
  1080. //
  1081. // Parameters:
  1082. // format:
  1083. // A composite format string (see Remarks).
  1084. //
  1085. // arg0:
  1086. // An object to write using format.
  1087. //
  1088. // Exceptions:
  1089. // T:System.IO.IOException:
  1090. // An I/O error occurred.
  1091. //
  1092. // T:System.ArgumentNullException:
  1093. // format is null.
  1094. //
  1095. // T:System.FormatException:
  1096. // The format specification in format is invalid.
  1097. /// <summary></summary>
  1098. /// <param name="format"></param>
  1099. /// <param name="arg0"></param>
  1100. public static void Write (string format, object arg0) { throw new NotImplementedException (); }
  1101. //
  1102. // Summary:
  1103. // Writes the text representation of the specified 32-bit unsigned integer value
  1104. // to the standard output stream.
  1105. //
  1106. // Parameters:
  1107. // value:
  1108. // The value to write.
  1109. //
  1110. // Exceptions:
  1111. // T:System.IO.IOException:
  1112. // An I/O error occurred.
  1113. //[CLSCompliant (false)]
  1114. /// <summary></summary>
  1115. /// <param name="value"></param>
  1116. public static void Write (uint value) { throw new NotImplementedException (); }
  1117. //[CLSCompliant (false)]
  1118. /// <summary></summary>
  1119. /// <param name="format"></param>
  1120. /// <param name="arg0"></param>
  1121. /// <param name="arg1"></param>
  1122. /// <param name="arg2"></param>
  1123. /// <param name="arg3"></param>
  1124. public static void Write (string format, object arg0, object arg1, object arg2, object arg3) { throw new NotImplementedException (); }
  1125. //
  1126. // Summary:
  1127. // Writes the text representation of the specified array of objects to the standard
  1128. // output stream using the specified format information.
  1129. //
  1130. // Parameters:
  1131. // format:
  1132. // A composite format string (see Remarks).
  1133. //
  1134. // arg:
  1135. // An array of objects to write using format.
  1136. //
  1137. // Exceptions:
  1138. // T:System.IO.IOException:
  1139. // An I/O error occurred.
  1140. //
  1141. // T:System.ArgumentNullException:
  1142. // format or arg is null.
  1143. //
  1144. // T:System.FormatException:
  1145. // The format specification in format is invalid.
  1146. /// <summary></summary>
  1147. /// <param name="format"></param>
  1148. /// <param name="arg"></param>
  1149. public static void Write (string format, params object [] arg) { throw new NotImplementedException (); }
  1150. //
  1151. // Summary:
  1152. // Writes the text representation of the specified Boolean value to the standard
  1153. // output stream.
  1154. //
  1155. // Parameters:
  1156. // value:
  1157. // The value to write.
  1158. //
  1159. // Exceptions:
  1160. // T:System.IO.IOException:
  1161. // An I/O error occurred.
  1162. /// <summary></summary>
  1163. /// <param name="value"></param>
  1164. public static void Write (bool value) { throw new NotImplementedException (); }
  1165. //
  1166. // Summary:
  1167. // Writes the specified Unicode character value to the standard output stream.
  1168. //
  1169. // Parameters:
  1170. // value:
  1171. // The value to write.
  1172. //
  1173. // Exceptions:
  1174. // T:System.IO.IOException:
  1175. // An I/O error occurred.
  1176. /// <summary></summary>
  1177. /// <param name="value"></param>
  1178. public static void Write (char value) { _buffer [CursorLeft, CursorTop] = value; }
  1179. //
  1180. // Summary:
  1181. // Writes the specified array of Unicode characters to the standard output stream.
  1182. //
  1183. // Parameters:
  1184. // buffer:
  1185. // A Unicode character array.
  1186. //
  1187. // Exceptions:
  1188. // T:System.IO.IOException:
  1189. // An I/O error occurred.
  1190. /// <summary></summary>
  1191. /// <param name="buffer"></param>
  1192. public static void Write (char [] buffer)
  1193. {
  1194. _buffer [CursorLeft, CursorTop] = (char)0;
  1195. foreach (char ch in buffer)
  1196. {
  1197. _buffer [CursorLeft, CursorTop] += ch;
  1198. }
  1199. }
  1200. //
  1201. // Summary:
  1202. // Writes the specified subarray of Unicode characters to the standard output stream.
  1203. //
  1204. // Parameters:
  1205. // buffer:
  1206. // An array of Unicode characters.
  1207. //
  1208. // index:
  1209. // The starting position in buffer.
  1210. //
  1211. // count:
  1212. // The number of characters to write.
  1213. //
  1214. // Exceptions:
  1215. // T:System.ArgumentNullException:
  1216. // buffer is null.
  1217. //
  1218. // T:System.ArgumentOutOfRangeException:
  1219. // index or count is less than zero.
  1220. //
  1221. // T:System.ArgumentException:
  1222. // index plus count specify a position that is not within buffer.
  1223. //
  1224. // T:System.IO.IOException:
  1225. // An I/O error occurred.
  1226. /// <summary></summary>
  1227. /// <param name="buffer"></param>
  1228. /// <param name="index"></param>
  1229. /// <param name="count"></param>
  1230. public static void Write (char [] buffer, int index, int count) { throw new NotImplementedException (); }
  1231. //
  1232. // Summary:
  1233. // Writes the text representation of the specified objects to the standard output
  1234. // stream using the specified format information.
  1235. //
  1236. // Parameters:
  1237. // format:
  1238. // A composite format string (see Remarks).
  1239. //
  1240. // arg0:
  1241. // The first object to write using format.
  1242. //
  1243. // arg1:
  1244. // The second object to write using format.
  1245. //
  1246. // arg2:
  1247. // The third object to write using format.
  1248. //
  1249. // Exceptions:
  1250. // T:System.IO.IOException:
  1251. // An I/O error occurred.
  1252. //
  1253. // T:System.ArgumentNullException:
  1254. // format is null.
  1255. //
  1256. // T:System.FormatException:
  1257. // The format specification in format is invalid.
  1258. /// <summary></summary>
  1259. /// <param name="format"></param>
  1260. /// <param name="arg0"></param>
  1261. /// <param name="arg1"></param>
  1262. /// <param name="arg2"></param>
  1263. public static void Write (string format, object arg0, object arg1, object arg2) { throw new NotImplementedException (); }
  1264. //
  1265. // Summary:
  1266. // Writes the text representation of the specified System.Decimal value to the standard
  1267. // output stream.
  1268. //
  1269. // Parameters:
  1270. // value:
  1271. // The value to write.
  1272. //
  1273. // Exceptions:
  1274. // T:System.IO.IOException:
  1275. // An I/O error occurred.
  1276. /// <summary></summary>
  1277. /// <param name="value"></param>
  1278. public static void Write (decimal value) { throw new NotImplementedException (); }
  1279. //
  1280. // Summary:
  1281. // Writes the text representation of the specified single-precision floating-point
  1282. // value to the standard output stream.
  1283. //
  1284. // Parameters:
  1285. // value:
  1286. // The value to write.
  1287. //
  1288. // Exceptions:
  1289. // T:System.IO.IOException:
  1290. // An I/O error occurred.
  1291. /// <summary></summary>
  1292. /// <param name="value"></param>
  1293. public static void Write (float value) { throw new NotImplementedException (); }
  1294. //
  1295. // Summary:
  1296. // Writes the text representation of the specified double-precision floating-point
  1297. // value to the standard output stream.
  1298. //
  1299. // Parameters:
  1300. // value:
  1301. // The value to write.
  1302. //
  1303. // Exceptions:
  1304. // T:System.IO.IOException:
  1305. // An I/O error occurred.
  1306. /// <summary></summary>
  1307. /// <param name="value"></param>
  1308. public static void Write (double value) { throw new NotImplementedException (); }
  1309. //
  1310. // Summary:
  1311. // Writes the current line terminator to the standard output stream.
  1312. //
  1313. // Exceptions:
  1314. // T:System.IO.IOException:
  1315. // An I/O error occurred.
  1316. /// <summary></summary>
  1317. public static void WriteLine () { throw new NotImplementedException (); }
  1318. //
  1319. // Summary:
  1320. // Writes the text representation of the specified single-precision floating-point
  1321. // value, followed by the current line terminator, to the standard output stream.
  1322. //
  1323. // Parameters:
  1324. // value:
  1325. // The value to write.
  1326. //
  1327. // Exceptions:
  1328. // T:System.IO.IOException:
  1329. // An I/O error occurred.
  1330. /// <summary></summary>
  1331. /// <param name="value"></param>
  1332. public static void WriteLine (float value) { throw new NotImplementedException (); }
  1333. //
  1334. // Summary:
  1335. // Writes the text representation of the specified 32-bit signed integer value,
  1336. // followed by the current line terminator, to the standard output stream.
  1337. //
  1338. // Parameters:
  1339. // value:
  1340. // The value to write.
  1341. //
  1342. // Exceptions:
  1343. // T:System.IO.IOException:
  1344. // An I/O error occurred.
  1345. /// <summary></summary>
  1346. /// <param name="value"></param>
  1347. public static void WriteLine (int value) { throw new NotImplementedException (); }
  1348. //
  1349. // Summary:
  1350. // Writes the text representation of the specified 32-bit unsigned integer value,
  1351. // followed by the current line terminator, to the standard output stream.
  1352. //
  1353. // Parameters:
  1354. // value:
  1355. // The value to write.
  1356. //
  1357. // Exceptions:
  1358. // T:System.IO.IOException:
  1359. // An I/O error occurred.
  1360. //[CLSCompliant (false)]
  1361. /// <summary></summary>
  1362. /// <param name="value"></param>
  1363. public static void WriteLine (uint value) { throw new NotImplementedException (); }
  1364. //
  1365. // Summary:
  1366. // Writes the text representation of the specified 64-bit signed integer value,
  1367. // followed by the current line terminator, to the standard output stream.
  1368. //
  1369. // Parameters:
  1370. // value:
  1371. // The value to write.
  1372. //
  1373. // Exceptions:
  1374. // T:System.IO.IOException:
  1375. // An I/O error occurred.
  1376. /// <summary></summary>
  1377. /// <param name="value"></param>
  1378. public static void WriteLine (long value) { throw new NotImplementedException (); }
  1379. //
  1380. // Summary:
  1381. // Writes the text representation of the specified 64-bit unsigned integer value,
  1382. // followed by the current line terminator, to the standard output stream.
  1383. //
  1384. // Parameters:
  1385. // value:
  1386. // The value to write.
  1387. //
  1388. // Exceptions:
  1389. // T:System.IO.IOException:
  1390. // An I/O error occurred.
  1391. //[CLSCompliant (false)]
  1392. /// <summary></summary>
  1393. /// <param name="value"></param>
  1394. public static void WriteLine (ulong value) { throw new NotImplementedException (); }
  1395. //
  1396. // Summary:
  1397. // Writes the text representation of the specified object, followed by the current
  1398. // line terminator, to the standard output stream.
  1399. //
  1400. // Parameters:
  1401. // value:
  1402. // The value to write.
  1403. //
  1404. // Exceptions:
  1405. // T:System.IO.IOException:
  1406. // An I/O error occurred.
  1407. /// <summary></summary>
  1408. /// <param name="value"></param>
  1409. public static void WriteLine (object value) { throw new NotImplementedException (); }
  1410. //
  1411. // Summary:
  1412. // Writes the specified string value, followed by the current line terminator, to
  1413. // the standard output stream.
  1414. //
  1415. // Parameters:
  1416. // value:
  1417. // The value to write.
  1418. //
  1419. // Exceptions:
  1420. // T:System.IO.IOException:
  1421. // An I/O error occurred.
  1422. /// <summary></summary>
  1423. /// <param name="value"></param>
  1424. public static void WriteLine (string value) { throw new NotImplementedException (); }
  1425. //
  1426. // Summary:
  1427. // Writes the text representation of the specified object, followed by the current
  1428. // line terminator, to the standard output stream using the specified format information.
  1429. //
  1430. // Parameters:
  1431. // format:
  1432. // A composite format string (see Remarks).
  1433. //
  1434. // arg0:
  1435. // An object to write using format.
  1436. //
  1437. // Exceptions:
  1438. // T:System.IO.IOException:
  1439. // An I/O error occurred.
  1440. //
  1441. // T:System.ArgumentNullException:
  1442. // format is null.
  1443. //
  1444. // T:System.FormatException:
  1445. // The format specification in format is invalid.
  1446. /// <summary></summary>
  1447. /// <param name="format"></param>
  1448. /// <param name="arg0"></param>
  1449. public static void WriteLine (string format, object arg0) { throw new NotImplementedException (); }
  1450. //
  1451. // Summary:
  1452. // Writes the text representation of the specified objects, followed by the current
  1453. // line terminator, to the standard output stream using the specified format information.
  1454. //
  1455. // Parameters:
  1456. // format:
  1457. // A composite format string (see Remarks).
  1458. //
  1459. // arg0:
  1460. // The first object to write using format.
  1461. //
  1462. // arg1:
  1463. // The second object to write using format.
  1464. //
  1465. // arg2:
  1466. // The third object to write using format.
  1467. //
  1468. // Exceptions:
  1469. // T:System.IO.IOException:
  1470. // An I/O error occurred.
  1471. //
  1472. // T:System.ArgumentNullException:
  1473. // format is null.
  1474. //
  1475. // T:System.FormatException:
  1476. // The format specification in format is invalid.
  1477. /// <summary></summary>
  1478. /// <param name="format"></param>
  1479. /// <param name="arg0"></param>
  1480. /// <param name="arg1"></param>
  1481. /// <param name="arg2"></param>
  1482. public static void WriteLine (string format, object arg0, object arg1, object arg2) { throw new NotImplementedException (); }
  1483. //[CLSCompliant (false)]
  1484. /// <summary></summary>
  1485. /// <param name="format"></param>
  1486. /// <param name="arg0"></param>
  1487. /// <param name="arg1"></param>
  1488. /// <param name="arg2"></param>
  1489. /// <param name="arg3"></param>
  1490. public static void WriteLine (string format, object arg0, object arg1, object arg2, object arg3) { throw new NotImplementedException (); }
  1491. //
  1492. // Summary:
  1493. // Writes the text representation of the specified array of objects, followed by
  1494. // the current line terminator, to the standard output stream using the specified
  1495. // format information.
  1496. //
  1497. // Parameters:
  1498. // format:
  1499. // A composite format string (see Remarks).
  1500. //
  1501. // arg:
  1502. // An array of objects to write using format.
  1503. //
  1504. // Exceptions:
  1505. // T:System.IO.IOException:
  1506. // An I/O error occurred.
  1507. //
  1508. // T:System.ArgumentNullException:
  1509. // format or arg is null.
  1510. //
  1511. // T:System.FormatException:
  1512. // The format specification in format is invalid.
  1513. /// <summary></summary>
  1514. /// <param name="format"></param>
  1515. /// <param name="arg"></param>
  1516. public static void WriteLine (string format, params object [] arg) { throw new NotImplementedException (); }
  1517. //
  1518. // Summary:
  1519. // Writes the specified subarray of Unicode characters, followed by the current
  1520. // line terminator, to the standard output stream.
  1521. //
  1522. // Parameters:
  1523. // buffer:
  1524. // An array of Unicode characters.
  1525. //
  1526. // index:
  1527. // The starting position in buffer.
  1528. //
  1529. // count:
  1530. // The number of characters to write.
  1531. //
  1532. // Exceptions:
  1533. // T:System.ArgumentNullException:
  1534. // buffer is null.
  1535. //
  1536. // T:System.ArgumentOutOfRangeException:
  1537. // index or count is less than zero.
  1538. //
  1539. // T:System.ArgumentException:
  1540. // index plus count specify a position that is not within buffer.
  1541. //
  1542. // T:System.IO.IOException:
  1543. // An I/O error occurred.
  1544. /// <summary></summary>
  1545. /// <param name="buffer"></param>
  1546. /// <param name="index"></param>
  1547. /// <param name="count"></param>
  1548. public static void WriteLine (char [] buffer, int index, int count) { throw new NotImplementedException (); }
  1549. //
  1550. // Summary:
  1551. // Writes the text representation of the specified System.Decimal value, followed
  1552. // by the current line terminator, to the standard output stream.
  1553. //
  1554. // Parameters:
  1555. // value:
  1556. // The value to write.
  1557. //
  1558. // Exceptions:
  1559. // T:System.IO.IOException:
  1560. // An I/O error occurred.
  1561. /// <summary></summary>
  1562. /// <param name="value"></param>
  1563. public static void WriteLine (decimal value) { throw new NotImplementedException (); }
  1564. //
  1565. // Summary:
  1566. // Writes the specified array of Unicode characters, followed by the current line
  1567. // terminator, to the standard output stream.
  1568. //
  1569. // Parameters:
  1570. // buffer:
  1571. // A Unicode character array.
  1572. //
  1573. // Exceptions:
  1574. // T:System.IO.IOException:
  1575. // An I/O error occurred.
  1576. /// <summary></summary>
  1577. /// <param name="buffer"></param>
  1578. public static void WriteLine (char [] buffer) { throw new NotImplementedException (); }
  1579. //
  1580. // Summary:
  1581. // Writes the specified Unicode character, followed by the current line terminator,
  1582. // value to the standard output stream.
  1583. //
  1584. // Parameters:
  1585. // value:
  1586. // The value to write.
  1587. //
  1588. // Exceptions:
  1589. // T:System.IO.IOException:
  1590. // An I/O error occurred.
  1591. /// <summary></summary>
  1592. /// <param name="value"></param>
  1593. public static void WriteLine (char value) { throw new NotImplementedException (); }
  1594. //
  1595. // Summary:
  1596. // Writes the text representation of the specified Boolean value, followed by the
  1597. // current line terminator, to the standard output stream.
  1598. //
  1599. // Parameters:
  1600. // value:
  1601. // The value to write.
  1602. //
  1603. // Exceptions:
  1604. // T:System.IO.IOException:
  1605. // An I/O error occurred.
  1606. /// <summary></summary>
  1607. /// <param name="value"></param>
  1608. public static void WriteLine (bool value) { throw new NotImplementedException (); }
  1609. //
  1610. // Summary:
  1611. // Writes the text representation of the specified objects, followed by the current
  1612. // line terminator, to the standard output stream using the specified format information.
  1613. //
  1614. // Parameters:
  1615. // format:
  1616. // A composite format string (see Remarks).
  1617. //
  1618. // arg0:
  1619. // The first object to write using format.
  1620. //
  1621. // arg1:
  1622. // The second object to write using format.
  1623. //
  1624. // Exceptions:
  1625. // T:System.IO.IOException:
  1626. // An I/O error occurred.
  1627. //
  1628. // T:System.ArgumentNullException:
  1629. // format is null.
  1630. //
  1631. // T:System.FormatException:
  1632. // The format specification in format is invalid.
  1633. /// <summary></summary>
  1634. /// <param name="format"></param>
  1635. /// <param name="arg0"></param>
  1636. /// <param name="arg1"></param>
  1637. public static void WriteLine (string format, object arg0, object arg1) { throw new NotImplementedException (); }
  1638. //
  1639. // Summary:
  1640. // Writes the text representation of the specified double-precision floating-point
  1641. // value, followed by the current line terminator, to the standard output stream.
  1642. //
  1643. // Parameters:
  1644. // value:
  1645. // The value to write.
  1646. //
  1647. // Exceptions:
  1648. // T:System.IO.IOException:
  1649. // An I/O error occurred.
  1650. /// <summary></summary>
  1651. /// <param name="value"></param>
  1652. public static void WriteLine (double value) { throw new NotImplementedException (); }
  1653. }