Merge pull request #439 from mono-soc-2012/garyb/iconfix
[mono.git] / mcs / class / corlib / System.Diagnostics / Debugger.cs
index 7e5a19e29a186f24f365141fc5866555bf291703..02113358021b795cd8d3eb873ff73c66549469fa 100644 (file)
@@ -77,12 +77,8 @@ namespace System.Diagnostics
                /// <summary>
                /// Checks to see if logging is enabled by an attached debugger.
                /// </summary>
-               public static bool IsLogging()
-               {
-                       // Return false. DefaultTraceListener invokes this method, so throwing
-                       // a NotImplementedException wouldn't be appropriate.
-                       return false;
-               }
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               public static extern bool IsLogging();
 
                /// <summary>
                /// Launches and attaches a debugger to the process.
@@ -105,15 +101,14 @@ namespace System.Diagnostics
                /// <param name="message">
                /// A string representing the message to show.
                /// </param>
-               public static void Log(int level, string category, string message)
-               {
-                       // Do nothing. DefaultTraceListener invokes this method, so throwing
-                       // a NotImplementedException wouldn't be appropriate.
-               }
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               public static extern void Log(int level, string category, string message);
 
+#if NET_4_0
+               [ObsoleteAttribute("Call the static methods directly on this type", true)]
+#endif
                public Debugger()
                {
                }
-
        }
 }