FakeConsole.cs 49 KB

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