FakeConsole.cs 50 KB

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