FakeConsole.cs 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997
  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. /// <summary>
  162. ///
  163. /// </summary>
  164. public static ConsoleColor BackgroundColor { get; set; } = _defaultBackgroundColor;
  165. static ConsoleColor _defaultBackgroundColor = ConsoleColor.Black;
  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. /// <summary>
  184. ///
  185. /// </summary>
  186. public static ConsoleColor ForegroundColor { get; set; } = _defaultForegroundColor;
  187. static ConsoleColor _defaultForegroundColor = ConsoleColor.Gray;
  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. /// <summary>
  537. ///
  538. /// </summary>
  539. public static void Clear ()
  540. {
  541. _buffer = new char [BufferWidth, BufferHeight];
  542. SetCursorPosition (0, 0);
  543. }
  544. static char [,] _buffer = new char [WindowWidth, WindowHeight];
  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. }
  902. //
  903. // Summary:
  904. // Sets the position of the cursor.
  905. //
  906. // Parameters:
  907. // left:
  908. // The column position of the cursor. Columns are numbered from left to right starting
  909. // at 0.
  910. //
  911. // top:
  912. // The row position of the cursor. Rows are numbered from top to bottom starting
  913. // at 0.
  914. //
  915. // Exceptions:
  916. // T:System.ArgumentOutOfRangeException:
  917. // left or top is less than zero.-or- left is greater than or equal to System.Console.BufferWidth.-or-
  918. // top is greater than or equal to System.Console.BufferHeight.
  919. //
  920. // T:System.Security.SecurityException:
  921. // The user does not have permission to perform this action.
  922. //
  923. // T:System.IO.IOException:
  924. // An I/O error occurred.
  925. //[SecuritySafeCritical]
  926. /// <summary>
  927. ///
  928. /// </summary>
  929. public static void SetCursorPosition (int left, int top)
  930. {
  931. CursorLeft = left;
  932. CursorTop = top;
  933. WindowLeft = Math.Max (Math.Min (left, BufferWidth - WindowWidth), 0);
  934. WindowTop = Math.Max (Math.Min (top, BufferHeight - WindowHeight), 0);
  935. }
  936. //
  937. // Summary:
  938. // Sets the System.Console.Error property to the specified System.IO.TextWriter
  939. // object.
  940. //
  941. // Parameters:
  942. // newError:
  943. // A stream that is the new standard error output.
  944. //
  945. // Exceptions:
  946. // T:System.ArgumentNullException:
  947. // newError is null.
  948. //
  949. // T:System.Security.SecurityException:
  950. // The caller does not have the required permission.
  951. //[SecuritySafeCritical]
  952. /// <summary>
  953. ///
  954. /// </summary>
  955. public static void SetError (TextWriter newError)
  956. {
  957. throw new NotImplementedException ();
  958. }
  959. //
  960. // Summary:
  961. // Sets the System.Console.In property to the specified System.IO.TextReader object.
  962. //
  963. // Parameters:
  964. // newIn:
  965. // A stream that is the new standard input.
  966. //
  967. // Exceptions:
  968. // T:System.ArgumentNullException:
  969. // newIn is null.
  970. //
  971. // T:System.Security.SecurityException:
  972. // The caller does not have the required permission.
  973. //[SecuritySafeCritical]
  974. /// <summary>
  975. ///
  976. /// </summary>
  977. public static void SetIn (TextReader newIn)
  978. {
  979. throw new NotImplementedException ();
  980. }
  981. //
  982. // Summary:
  983. // Sets the System.Console.Out property to the specified System.IO.TextWriter object.
  984. //
  985. // Parameters:
  986. // newOut:
  987. // A stream that is the new standard output.
  988. //
  989. // Exceptions:
  990. // T:System.ArgumentNullException:
  991. // newOut is null.
  992. //
  993. // T:System.Security.SecurityException:
  994. // The caller does not have the required permission.
  995. //[SecuritySafeCritical]
  996. /// <summary>
  997. ///
  998. /// </summary>
  999. /// <param name="newOut"></param>
  1000. public static void SetOut (TextWriter newOut)
  1001. {
  1002. throw new NotImplementedException ();
  1003. }
  1004. //
  1005. // Summary:
  1006. // Sets the position of the console window relative to the screen buffer.
  1007. //
  1008. // Parameters:
  1009. // left:
  1010. // The column position of the upper left corner of the console window.
  1011. //
  1012. // top:
  1013. // The row position of the upper left corner of the console window.
  1014. //
  1015. // Exceptions:
  1016. // T:System.ArgumentOutOfRangeException:
  1017. // left or top is less than zero.-or- left + System.Console.WindowWidth is greater
  1018. // than System.Console.BufferWidth.-or- top + System.Console.WindowHeight is greater
  1019. // than System.Console.BufferHeight.
  1020. //
  1021. // T:System.Security.SecurityException:
  1022. // The user does not have permission to perform this action.
  1023. //
  1024. // T:System.IO.IOException:
  1025. // An I/O error occurred.
  1026. //[SecuritySafeCritical]
  1027. /// <summary>
  1028. ///
  1029. /// </summary>
  1030. /// <param name="left"></param>
  1031. /// <param name="top"></param>
  1032. public static void SetWindowPosition (int left, int top)
  1033. {
  1034. throw new NotImplementedException ();
  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. throw new NotImplementedException ();
  1068. }
  1069. //
  1070. // Summary:
  1071. // Writes the specified string value to the standard output stream.
  1072. //
  1073. // Parameters:
  1074. // value:
  1075. // The value to write.
  1076. //
  1077. // Exceptions:
  1078. // T:System.IO.IOException:
  1079. // An I/O error occurred.
  1080. /// <summary>
  1081. ///
  1082. /// </summary>
  1083. /// <param name="value"></param>
  1084. public static void Write (string value)
  1085. {
  1086. throw new NotImplementedException ();
  1087. }
  1088. //
  1089. // Summary:
  1090. // Writes the text representation of the specified object to the standard output
  1091. // stream.
  1092. //
  1093. // Parameters:
  1094. // value:
  1095. // The value to write, or null.
  1096. //
  1097. // Exceptions:
  1098. // T:System.IO.IOException:
  1099. // An I/O error occurred.
  1100. /// <summary>
  1101. ///
  1102. /// </summary>
  1103. /// <param name="value"></param>
  1104. public static void Write (object value)
  1105. {
  1106. throw new NotImplementedException ();
  1107. }
  1108. //
  1109. // Summary:
  1110. // Writes the text representation of the specified 64-bit unsigned integer value
  1111. // to the standard output stream.
  1112. //
  1113. // Parameters:
  1114. // value:
  1115. // The value to write.
  1116. //
  1117. // Exceptions:
  1118. // T:System.IO.IOException:
  1119. // An I/O error occurred.
  1120. //[CLSCompliant (false)]
  1121. /// <summary>
  1122. ///
  1123. /// </summary>
  1124. /// <param name="value"></param>
  1125. public static void Write (ulong value)
  1126. {
  1127. throw new NotImplementedException ();
  1128. }
  1129. //
  1130. // Summary:
  1131. // Writes the text representation of the specified 64-bit signed integer value to
  1132. // the standard output stream.
  1133. //
  1134. // Parameters:
  1135. // value:
  1136. // The value to write.
  1137. //
  1138. // Exceptions:
  1139. // T:System.IO.IOException:
  1140. // An I/O error occurred.
  1141. /// <summary>
  1142. ///
  1143. /// </summary>
  1144. /// <param name="value"></param>
  1145. public static void Write (long value)
  1146. {
  1147. throw new NotImplementedException ();
  1148. }
  1149. //
  1150. // Summary:
  1151. // Writes the text representation of the specified objects to the standard output
  1152. // stream using the specified format information.
  1153. //
  1154. // Parameters:
  1155. // format:
  1156. // A composite format string (see Remarks).
  1157. //
  1158. // arg0:
  1159. // The first object to write using format.
  1160. //
  1161. // arg1:
  1162. // The second object to write using format.
  1163. //
  1164. // Exceptions:
  1165. // T:System.IO.IOException:
  1166. // An I/O error occurred.
  1167. //
  1168. // T:System.ArgumentNullException:
  1169. // format is null.
  1170. //
  1171. // T:System.FormatException:
  1172. // The format specification in format is invalid.
  1173. /// <summary>
  1174. ///
  1175. /// </summary>
  1176. /// <param name="format"></param>
  1177. /// <param name="arg0"></param>
  1178. /// <param name="arg1"></param>
  1179. public static void Write (string format, object arg0, object arg1)
  1180. {
  1181. throw new NotImplementedException ();
  1182. }
  1183. //
  1184. // Summary:
  1185. // Writes the text representation of the specified 32-bit signed integer value to
  1186. // the standard output stream.
  1187. //
  1188. // Parameters:
  1189. // value:
  1190. // The value to write.
  1191. //
  1192. // Exceptions:
  1193. // T:System.IO.IOException:
  1194. // An I/O error occurred.
  1195. /// <summary>
  1196. ///
  1197. /// </summary>
  1198. /// <param name="value"></param>
  1199. public static void Write (int value)
  1200. {
  1201. throw new NotImplementedException ();
  1202. }
  1203. //
  1204. // Summary:
  1205. // Writes the text representation of the specified object to the standard output
  1206. // stream using the specified format information.
  1207. //
  1208. // Parameters:
  1209. // format:
  1210. // A composite format string (see Remarks).
  1211. //
  1212. // arg0:
  1213. // An object to write using format.
  1214. //
  1215. // Exceptions:
  1216. // T:System.IO.IOException:
  1217. // An I/O error occurred.
  1218. //
  1219. // T:System.ArgumentNullException:
  1220. // format is null.
  1221. //
  1222. // T:System.FormatException:
  1223. // The format specification in format is invalid.
  1224. /// <summary>
  1225. ///
  1226. /// </summary>
  1227. /// <param name="format"></param>
  1228. /// <param name="arg0"></param>
  1229. public static void Write (string format, object arg0)
  1230. {
  1231. throw new NotImplementedException ();
  1232. }
  1233. //
  1234. // Summary:
  1235. // Writes the text representation of the specified 32-bit unsigned integer value
  1236. // to the standard output stream.
  1237. //
  1238. // Parameters:
  1239. // value:
  1240. // The value to write.
  1241. //
  1242. // Exceptions:
  1243. // T:System.IO.IOException:
  1244. // An I/O error occurred.
  1245. //[CLSCompliant (false)]
  1246. /// <summary>
  1247. ///
  1248. /// </summary>
  1249. /// <param name="value"></param>
  1250. public static void Write (uint value)
  1251. {
  1252. throw new NotImplementedException ();
  1253. }
  1254. //[CLSCompliant (false)]
  1255. /// <summary>
  1256. ///
  1257. /// </summary>
  1258. /// <param name="format"></param>
  1259. /// <param name="arg0"></param>
  1260. /// <param name="arg1"></param>
  1261. /// <param name="arg2"></param>
  1262. /// <param name="arg3"></param>
  1263. public static void Write (string format, object arg0, object arg1, object arg2, object arg3)
  1264. {
  1265. throw new NotImplementedException ();
  1266. }
  1267. //
  1268. // Summary:
  1269. // Writes the text representation of the specified array of objects to the standard
  1270. // output stream using the specified format information.
  1271. //
  1272. // Parameters:
  1273. // format:
  1274. // A composite format string (see Remarks).
  1275. //
  1276. // arg:
  1277. // An array of objects to write using format.
  1278. //
  1279. // Exceptions:
  1280. // T:System.IO.IOException:
  1281. // An I/O error occurred.
  1282. //
  1283. // T:System.ArgumentNullException:
  1284. // format or arg is null.
  1285. //
  1286. // T:System.FormatException:
  1287. // The format specification in format is invalid.
  1288. /// <summary>
  1289. ///
  1290. /// </summary>
  1291. /// <param name="format"></param>
  1292. /// <param name="arg"></param>
  1293. public static void Write (string format, params object [] arg)
  1294. {
  1295. throw new NotImplementedException ();
  1296. }
  1297. //
  1298. // Summary:
  1299. // Writes the text representation of the specified Boolean value to the standard
  1300. // output stream.
  1301. //
  1302. // Parameters:
  1303. // value:
  1304. // The value to write.
  1305. //
  1306. // Exceptions:
  1307. // T:System.IO.IOException:
  1308. // An I/O error occurred.
  1309. /// <summary>
  1310. ///
  1311. /// </summary>
  1312. /// <param name="value"></param>
  1313. public static void Write (bool value)
  1314. {
  1315. throw new NotImplementedException ();
  1316. }
  1317. //
  1318. // Summary:
  1319. // Writes the specified Unicode character value to the standard output stream.
  1320. //
  1321. // Parameters:
  1322. // value:
  1323. // The value to write.
  1324. //
  1325. // Exceptions:
  1326. // T:System.IO.IOException:
  1327. // An I/O error occurred.
  1328. /// <summary>
  1329. ///
  1330. /// </summary>
  1331. /// <param name="value"></param>
  1332. public static void Write (char value)
  1333. {
  1334. _buffer [CursorLeft, CursorTop] = value;
  1335. }
  1336. //
  1337. // Summary:
  1338. // Writes the specified array of Unicode characters to the standard output stream.
  1339. //
  1340. // Parameters:
  1341. // buffer:
  1342. // A Unicode character array.
  1343. //
  1344. // Exceptions:
  1345. // T:System.IO.IOException:
  1346. // An I/O error occurred.
  1347. /// <summary>
  1348. ///
  1349. /// </summary>
  1350. /// <param name="buffer"></param>
  1351. public static void Write (char [] buffer)
  1352. {
  1353. throw new NotImplementedException ();
  1354. }
  1355. //
  1356. // Summary:
  1357. // Writes the specified subarray of Unicode characters to the standard output stream.
  1358. //
  1359. // Parameters:
  1360. // buffer:
  1361. // An array of Unicode characters.
  1362. //
  1363. // index:
  1364. // The starting position in buffer.
  1365. //
  1366. // count:
  1367. // The number of characters to write.
  1368. //
  1369. // Exceptions:
  1370. // T:System.ArgumentNullException:
  1371. // buffer is null.
  1372. //
  1373. // T:System.ArgumentOutOfRangeException:
  1374. // index or count is less than zero.
  1375. //
  1376. // T:System.ArgumentException:
  1377. // index plus count specify a position that is not within buffer.
  1378. //
  1379. // T:System.IO.IOException:
  1380. // An I/O error occurred.
  1381. /// <summary>
  1382. ///
  1383. /// </summary>
  1384. /// <param name="buffer"></param>
  1385. /// <param name="index"></param>
  1386. /// <param name="count"></param>
  1387. public static void Write (char [] buffer, int index, int count)
  1388. {
  1389. throw new NotImplementedException ();
  1390. }
  1391. //
  1392. // Summary:
  1393. // Writes the text representation of the specified objects to the standard output
  1394. // stream using the specified format information.
  1395. //
  1396. // Parameters:
  1397. // format:
  1398. // A composite format string (see Remarks).
  1399. //
  1400. // arg0:
  1401. // The first object to write using format.
  1402. //
  1403. // arg1:
  1404. // The second object to write using format.
  1405. //
  1406. // arg2:
  1407. // The third object to write using format.
  1408. //
  1409. // Exceptions:
  1410. // T:System.IO.IOException:
  1411. // An I/O error occurred.
  1412. //
  1413. // T:System.ArgumentNullException:
  1414. // format is null.
  1415. //
  1416. // T:System.FormatException:
  1417. // The format specification in format is invalid.
  1418. /// <summary>
  1419. ///
  1420. /// </summary>
  1421. /// <param name="format"></param>
  1422. /// <param name="arg0"></param>
  1423. /// <param name="arg1"></param>
  1424. /// <param name="arg2"></param>
  1425. public static void Write (string format, object arg0, object arg1, object arg2)
  1426. {
  1427. throw new NotImplementedException ();
  1428. }
  1429. //
  1430. // Summary:
  1431. // Writes the text representation of the specified System.Decimal value to the standard
  1432. // output stream.
  1433. //
  1434. // Parameters:
  1435. // value:
  1436. // The value to write.
  1437. //
  1438. // Exceptions:
  1439. // T:System.IO.IOException:
  1440. // An I/O error occurred.
  1441. /// <summary>
  1442. ///
  1443. /// </summary>
  1444. /// <param name="value"></param>
  1445. public static void Write (decimal value)
  1446. {
  1447. throw new NotImplementedException ();
  1448. }
  1449. //
  1450. // Summary:
  1451. // Writes the text representation of the specified single-precision floating-point
  1452. // value to the standard output stream.
  1453. //
  1454. // Parameters:
  1455. // value:
  1456. // The value to write.
  1457. //
  1458. // Exceptions:
  1459. // T:System.IO.IOException:
  1460. // An I/O error occurred.
  1461. /// <summary>
  1462. ///
  1463. /// </summary>
  1464. /// <param name="value"></param>
  1465. public static void Write (float value)
  1466. {
  1467. throw new NotImplementedException ();
  1468. }
  1469. //
  1470. // Summary:
  1471. // Writes the text representation of the specified double-precision floating-point
  1472. // value to the standard output stream.
  1473. //
  1474. // Parameters:
  1475. // value:
  1476. // The value to write.
  1477. //
  1478. // Exceptions:
  1479. // T:System.IO.IOException:
  1480. // An I/O error occurred.
  1481. /// <summary>
  1482. ///
  1483. /// </summary>
  1484. /// <param name="value"></param>
  1485. public static void Write (double value)
  1486. {
  1487. throw new NotImplementedException ();
  1488. }
  1489. //
  1490. // Summary:
  1491. // Writes the current line terminator to the standard output stream.
  1492. //
  1493. // Exceptions:
  1494. // T:System.IO.IOException:
  1495. // An I/O error occurred.
  1496. /// <summary>
  1497. ///
  1498. /// </summary>
  1499. public static void WriteLine ()
  1500. {
  1501. throw new NotImplementedException ();
  1502. }
  1503. //
  1504. // Summary:
  1505. // Writes the text representation of the specified single-precision floating-point
  1506. // value, followed by the current line terminator, to the standard output stream.
  1507. //
  1508. // Parameters:
  1509. // value:
  1510. // The value to write.
  1511. //
  1512. // Exceptions:
  1513. // T:System.IO.IOException:
  1514. // An I/O error occurred.
  1515. /// <summary>
  1516. ///
  1517. /// </summary>
  1518. /// <param name="value"></param>
  1519. public static void WriteLine (float value)
  1520. {
  1521. throw new NotImplementedException ();
  1522. }
  1523. //
  1524. // Summary:
  1525. // Writes the text representation of the specified 32-bit signed integer value,
  1526. // followed by the current line terminator, to the standard output stream.
  1527. //
  1528. // Parameters:
  1529. // value:
  1530. // The value to write.
  1531. //
  1532. // Exceptions:
  1533. // T:System.IO.IOException:
  1534. // An I/O error occurred.
  1535. /// <summary>
  1536. ///
  1537. /// </summary>
  1538. /// <param name="value"></param>
  1539. public static void WriteLine (int value)
  1540. {
  1541. throw new NotImplementedException ();
  1542. }
  1543. //
  1544. // Summary:
  1545. // Writes the text representation of the specified 32-bit unsigned integer value,
  1546. // followed by the current line terminator, to the standard output stream.
  1547. //
  1548. // Parameters:
  1549. // value:
  1550. // The value to write.
  1551. //
  1552. // Exceptions:
  1553. // T:System.IO.IOException:
  1554. // An I/O error occurred.
  1555. //[CLSCompliant (false)]
  1556. /// <summary>
  1557. ///
  1558. /// </summary>
  1559. /// <param name="value"></param>
  1560. public static void WriteLine (uint value)
  1561. {
  1562. throw new NotImplementedException ();
  1563. }
  1564. //
  1565. // Summary:
  1566. // Writes the text representation of the specified 64-bit signed integer value,
  1567. // followed by the current line terminator, to the standard output stream.
  1568. //
  1569. // Parameters:
  1570. // value:
  1571. // The value to write.
  1572. //
  1573. // Exceptions:
  1574. // T:System.IO.IOException:
  1575. // An I/O error occurred.
  1576. /// <summary>
  1577. ///
  1578. /// </summary>
  1579. /// <param name="value"></param>
  1580. public static void WriteLine (long value)
  1581. {
  1582. throw new NotImplementedException ();
  1583. }
  1584. //
  1585. // Summary:
  1586. // Writes the text representation of the specified 64-bit unsigned integer value,
  1587. // followed by the current line terminator, to the standard output stream.
  1588. //
  1589. // Parameters:
  1590. // value:
  1591. // The value to write.
  1592. //
  1593. // Exceptions:
  1594. // T:System.IO.IOException:
  1595. // An I/O error occurred.
  1596. //[CLSCompliant (false)]
  1597. /// <summary>
  1598. ///
  1599. /// </summary>
  1600. /// <param name="value"></param>
  1601. public static void WriteLine (ulong value)
  1602. {
  1603. throw new NotImplementedException ();
  1604. }
  1605. //
  1606. // Summary:
  1607. // Writes the text representation of the specified object, followed by the current
  1608. // line terminator, to the standard output stream.
  1609. //
  1610. // Parameters:
  1611. // value:
  1612. // The value to write.
  1613. //
  1614. // Exceptions:
  1615. // T:System.IO.IOException:
  1616. // An I/O error occurred.
  1617. /// <summary>
  1618. ///
  1619. /// </summary>
  1620. /// <param name="value"></param>
  1621. public static void WriteLine (object value)
  1622. {
  1623. throw new NotImplementedException ();
  1624. }
  1625. //
  1626. // Summary:
  1627. // Writes the specified string value, followed by the current line terminator, to
  1628. // the standard output stream.
  1629. //
  1630. // Parameters:
  1631. // value:
  1632. // The value to write.
  1633. //
  1634. // Exceptions:
  1635. // T:System.IO.IOException:
  1636. // An I/O error occurred.
  1637. /// <summary>
  1638. ///
  1639. /// </summary>
  1640. /// <param name="value"></param>
  1641. public static void WriteLine (string value)
  1642. {
  1643. throw new NotImplementedException ();
  1644. }
  1645. //
  1646. // Summary:
  1647. // Writes the text representation of the specified object, followed by the current
  1648. // line terminator, to the standard output stream using the specified format information.
  1649. //
  1650. // Parameters:
  1651. // format:
  1652. // A composite format string (see Remarks).
  1653. //
  1654. // arg0:
  1655. // An object to write using format.
  1656. //
  1657. // Exceptions:
  1658. // T:System.IO.IOException:
  1659. // An I/O error occurred.
  1660. //
  1661. // T:System.ArgumentNullException:
  1662. // format is null.
  1663. //
  1664. // T:System.FormatException:
  1665. // The format specification in format is invalid.
  1666. /// <summary>
  1667. ///
  1668. /// </summary>
  1669. /// <param name="format"></param>
  1670. /// <param name="arg0"></param>
  1671. public static void WriteLine (string format, object arg0)
  1672. {
  1673. throw new NotImplementedException ();
  1674. }
  1675. //
  1676. // Summary:
  1677. // Writes the text representation of the specified objects, followed by the current
  1678. // line terminator, to the standard output stream using the specified format information.
  1679. //
  1680. // Parameters:
  1681. // format:
  1682. // A composite format string (see Remarks).
  1683. //
  1684. // arg0:
  1685. // The first object to write using format.
  1686. //
  1687. // arg1:
  1688. // The second object to write using format.
  1689. //
  1690. // arg2:
  1691. // The third object to write using format.
  1692. //
  1693. // Exceptions:
  1694. // T:System.IO.IOException:
  1695. // An I/O error occurred.
  1696. //
  1697. // T:System.ArgumentNullException:
  1698. // format is null.
  1699. //
  1700. // T:System.FormatException:
  1701. // The format specification in format is invalid.
  1702. /// <summary>
  1703. ///
  1704. /// </summary>
  1705. /// <param name="format"></param>
  1706. /// <param name="arg0"></param>
  1707. /// <param name="arg1"></param>
  1708. /// <param name="arg2"></param>
  1709. public static void WriteLine (string format, object arg0, object arg1, object arg2)
  1710. {
  1711. throw new NotImplementedException ();
  1712. }
  1713. //[CLSCompliant (false)]
  1714. /// <summary>
  1715. ///
  1716. /// </summary>
  1717. /// <param name="format"></param>
  1718. /// <param name="arg0"></param>
  1719. /// <param name="arg1"></param>
  1720. /// <param name="arg2"></param>
  1721. /// <param name="arg3"></param>
  1722. public static void WriteLine (string format, object arg0, object arg1, object arg2, object arg3)
  1723. {
  1724. throw new NotImplementedException ();
  1725. }
  1726. //
  1727. // Summary:
  1728. // Writes the text representation of the specified array of objects, followed by
  1729. // the current line terminator, to the standard output stream using the specified
  1730. // format information.
  1731. //
  1732. // Parameters:
  1733. // format:
  1734. // A composite format string (see Remarks).
  1735. //
  1736. // arg:
  1737. // An array of objects to write using format.
  1738. //
  1739. // Exceptions:
  1740. // T:System.IO.IOException:
  1741. // An I/O error occurred.
  1742. //
  1743. // T:System.ArgumentNullException:
  1744. // format or arg is null.
  1745. //
  1746. // T:System.FormatException:
  1747. // The format specification in format is invalid.
  1748. /// <summary>
  1749. ///
  1750. /// </summary>
  1751. /// <param name="format"></param>
  1752. /// <param name="arg"></param>
  1753. public static void WriteLine (string format, params object [] arg)
  1754. {
  1755. throw new NotImplementedException ();
  1756. }
  1757. //
  1758. // Summary:
  1759. // Writes the specified subarray of Unicode characters, followed by the current
  1760. // line terminator, to the standard output stream.
  1761. //
  1762. // Parameters:
  1763. // buffer:
  1764. // An array of Unicode characters.
  1765. //
  1766. // index:
  1767. // The starting position in buffer.
  1768. //
  1769. // count:
  1770. // The number of characters to write.
  1771. //
  1772. // Exceptions:
  1773. // T:System.ArgumentNullException:
  1774. // buffer is null.
  1775. //
  1776. // T:System.ArgumentOutOfRangeException:
  1777. // index or count is less than zero.
  1778. //
  1779. // T:System.ArgumentException:
  1780. // index plus count specify a position that is not within buffer.
  1781. //
  1782. // T:System.IO.IOException:
  1783. // An I/O error occurred.
  1784. /// <summary>
  1785. ///
  1786. /// </summary>
  1787. /// <param name="buffer"></param>
  1788. /// <param name="index"></param>
  1789. /// <param name="count"></param>
  1790. public static void WriteLine (char [] buffer, int index, int count)
  1791. {
  1792. throw new NotImplementedException ();
  1793. }
  1794. //
  1795. // Summary:
  1796. // Writes the text representation of the specified System.Decimal value, followed
  1797. // by the current line terminator, to the standard output stream.
  1798. //
  1799. // Parameters:
  1800. // value:
  1801. // The value to write.
  1802. //
  1803. // Exceptions:
  1804. // T:System.IO.IOException:
  1805. // An I/O error occurred.
  1806. /// <summary>
  1807. ///
  1808. /// </summary>
  1809. /// <param name="value"></param>
  1810. public static void WriteLine (decimal value)
  1811. {
  1812. throw new NotImplementedException ();
  1813. }
  1814. //
  1815. // Summary:
  1816. // Writes the specified array of Unicode characters, followed by the current line
  1817. // terminator, to the standard output stream.
  1818. //
  1819. // Parameters:
  1820. // buffer:
  1821. // A Unicode character array.
  1822. //
  1823. // Exceptions:
  1824. // T:System.IO.IOException:
  1825. // An I/O error occurred.
  1826. /// <summary>
  1827. ///
  1828. /// </summary>
  1829. /// <param name="buffer"></param>
  1830. public static void WriteLine (char [] buffer)
  1831. {
  1832. throw new NotImplementedException ();
  1833. }
  1834. //
  1835. // Summary:
  1836. // Writes the specified Unicode character, followed by the current line terminator,
  1837. // value to the standard output stream.
  1838. //
  1839. // Parameters:
  1840. // value:
  1841. // The value to write.
  1842. //
  1843. // Exceptions:
  1844. // T:System.IO.IOException:
  1845. // An I/O error occurred.
  1846. /// <summary>
  1847. ///
  1848. /// </summary>
  1849. /// <param name="value"></param>
  1850. public static void WriteLine (char value)
  1851. {
  1852. throw new NotImplementedException ();
  1853. }
  1854. //
  1855. // Summary:
  1856. // Writes the text representation of the specified Boolean value, followed by the
  1857. // current line terminator, to the standard output stream.
  1858. //
  1859. // Parameters:
  1860. // value:
  1861. // The value to write.
  1862. //
  1863. // Exceptions:
  1864. // T:System.IO.IOException:
  1865. // An I/O error occurred.
  1866. /// <summary>
  1867. ///
  1868. /// </summary>
  1869. /// <param name="value"></param>
  1870. public static void WriteLine (bool value)
  1871. {
  1872. throw new NotImplementedException ();
  1873. }
  1874. //
  1875. // Summary:
  1876. // Writes the text representation of the specified objects, followed by the current
  1877. // line terminator, to the standard output stream using the specified format information.
  1878. //
  1879. // Parameters:
  1880. // format:
  1881. // A composite format string (see Remarks).
  1882. //
  1883. // arg0:
  1884. // The first object to write using format.
  1885. //
  1886. // arg1:
  1887. // The second object to write using format.
  1888. //
  1889. // Exceptions:
  1890. // T:System.IO.IOException:
  1891. // An I/O error occurred.
  1892. //
  1893. // T:System.ArgumentNullException:
  1894. // format is null.
  1895. //
  1896. // T:System.FormatException:
  1897. // The format specification in format is invalid.
  1898. /// <summary>
  1899. ///
  1900. /// </summary>
  1901. /// <param name="format"></param>
  1902. /// <param name="arg0"></param>
  1903. /// <param name="arg1"></param>
  1904. public static void WriteLine (string format, object arg0, object arg1)
  1905. {
  1906. throw new NotImplementedException ();
  1907. }
  1908. //
  1909. // Summary:
  1910. // Writes the text representation of the specified double-precision floating-point
  1911. // value, followed by the current line terminator, to the standard output stream.
  1912. //
  1913. // Parameters:
  1914. // value:
  1915. // The value to write.
  1916. //
  1917. // Exceptions:
  1918. // T:System.IO.IOException:
  1919. // An I/O error occurred.
  1920. /// <summary>
  1921. ///
  1922. /// </summary>
  1923. /// <param name="value"></param>
  1924. public static void WriteLine (double value)
  1925. {
  1926. throw new NotImplementedException ();
  1927. }
  1928. }
  1929. }