FakeConsole.cs 53 KB

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