From fe052e545180c43c77bac623cf6a030623bc2642 Mon Sep 17 00:00:00 2001 From: jbevain Date: Tue, 6 Apr 2010 12:48:27 +0000 Subject: [PATCH] 2010-04-06 Jb Evain * Debug.cs (Assert, WriteLine): add net_4_0 overloads. git-svn-id: svn+ssh://mono-cvs.ximian.com/source/trunk/mcs@154842 e3ebcda4-bce8-0310-ba0a-eca2169e7518 --- class/System/System.Diagnostics/ChangeLog | 4 ++++ class/System/System.Diagnostics/Debug.cs | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/class/System/System.Diagnostics/ChangeLog b/class/System/System.Diagnostics/ChangeLog index 28c62cd012..79b81cd9a1 100644 --- a/class/System/System.Diagnostics/ChangeLog +++ b/class/System/System.Diagnostics/ChangeLog @@ -1,3 +1,7 @@ +2010-04-06 Jb Evain + + * Debug.cs (Assert, WriteLine): add net_4_0 overloads. + 2010-03-11 Sebastien Pouliot * Debug_2_1.cs: Change type to static to match SL4 diff --git a/class/System/System.Diagnostics/Debug.cs b/class/System/System.Diagnostics/Debug.cs index 34d6b20ff2..08f7e7c540 100644 --- a/class/System/System.Diagnostics/Debug.cs +++ b/class/System/System.Diagnostics/Debug.cs @@ -78,6 +78,17 @@ namespace System.Diagnostics { TraceImpl.Assert (condition, message, detailMessage); } +#if NET_4_0 + [Conditional ("DEBUG")] + public static void Assert (bool condition, string message, + string detailMessageFormat, params object [] args) + { + TraceImpl.Assert (condition, + message, + string.Format (detailMessageFormat, args)); + } +#endif + [Conditional("DEBUG")] public static void Close () { @@ -176,6 +187,14 @@ namespace System.Diagnostics { TraceImpl.WriteLine (message); } +#if NET_4_0 + [Conditional("DEBUG")] + public static void WriteLine (string format, params object [] args) + { + TraceImpl.WriteLine (string.Format (format, args)); + } +#endif + [Conditional("DEBUG")] public static void WriteLine (object value, string category) { -- 2.11.4.GIT