Debugger.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. //
  2. // System.Diagnostics.Debugger.cs
  3. //
  4. // Author:
  5. // John R. Hicks ([email protected])
  6. //
  7. // (C) 2001
  8. //
  9. using System;
  10. namespace System.Diagnostics
  11. {
  12. /// <summary>
  13. /// Enables communication with a debugger.
  14. /// </summary>
  15. [MonoTODO]
  16. public sealed class Debugger
  17. {
  18. private static bool isAttached;
  19. /// <summary>
  20. /// Represents the default category of a message with a constant.
  21. /// </summary>
  22. public static readonly string DefaultCategory = "";
  23. /// <summary>
  24. /// Returns a Boolean indicating whether a debugger is attached to a process.
  25. /// </summary>
  26. /// <value>
  27. /// true if debugger is attached; otherwise, false.
  28. /// </value>
  29. public static bool IsAttached
  30. {
  31. get
  32. {
  33. return isAttached;
  34. }
  35. }
  36. /// <summary>
  37. /// Causes a breakpoint to be signaled to an attached debugger.
  38. /// </summary>
  39. [MonoTODO]
  40. public static void Break()
  41. {
  42. throw new NotImplementedException();
  43. }
  44. /// <summary>
  45. /// Checks to see if logging is enabled by an attached debugger.
  46. /// </summary>
  47. [MonoTODO]
  48. public static bool IsLogging()
  49. {
  50. // Return false. DefaultTraceListener invokes this method, so throwing
  51. // a NotImplementedException wouldn't be appropriate.
  52. return false;
  53. }
  54. /// <summary>
  55. /// Launches and attaches a debugger to the process.
  56. /// </summary>
  57. [MonoTODO]
  58. public static bool Launch()
  59. {
  60. throw new NotImplementedException();
  61. }
  62. /// <summary>
  63. /// Posts a message for the attached debugger.
  64. /// </summary>
  65. /// <param name="level">
  66. /// A description of the importance of this message
  67. /// </param>
  68. /// <param name="category">
  69. /// A string describing the category of this message.
  70. /// </param>
  71. /// <param name="message">
  72. /// A string representing the message to show.
  73. /// </param>
  74. [MonoTODO]
  75. public static void Log(int level, string category, string message)
  76. {
  77. // Do nothing. DefaultTraceListener invokes this method, so throwing
  78. // a NotImplementedException wouldn't be appropriate.
  79. }
  80. public Debugger()
  81. {
  82. isAttached = false;
  83. }
  84. }
  85. }