You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by ni...@apache.org on 2006/02/21 12:22:24 UTC

svn commit: r379423 - /logging/log4net/trunk/tests/src/Layout/XmlLayoutTest.cs

Author: nicko
Date: Tue Feb 21 03:22:18 2006
New Revision: 379423

URL: http://svn.apache.org/viewcvs?rev=379423&view=rev
Log:
Fixed code compatibility issue for .NET 1.1 and .NET 2.0. Related to LOG4NET-58

Modified:
    logging/log4net/trunk/tests/src/Layout/XmlLayoutTest.cs

Modified: logging/log4net/trunk/tests/src/Layout/XmlLayoutTest.cs
URL: http://svn.apache.org/viewcvs/logging/log4net/trunk/tests/src/Layout/XmlLayoutTest.cs?rev=379423&r1=379422&r2=379423&view=diff
==============================================================================
--- logging/log4net/trunk/tests/src/Layout/XmlLayoutTest.cs (original)
+++ logging/log4net/trunk/tests/src/Layout/XmlLayoutTest.cs Tue Feb 21 03:22:18 2006
@@ -58,14 +58,22 @@
 		private string createEventNode(string message)
 		{
 			return String.Format("<event logger=\"TestLogger\" timestamp=\"{0}\" level=\"INFO\" thread=\"TestThread\" domain=\"Tests\" identity=\"TestRunner\" username=\"TestRunner\"><message>{1}</message></event>\r\n", 
+#if NET_2_0
 			    XmlConvert.ToString(DateTime.Today, XmlDateTimeSerializationMode.Local),
+#else
+			    XmlConvert.ToString(DateTime.Today),
+#endif
 				message);
 		}
 
 		private string createEventNode(string key, string value)
 		{
 			return String.Format("<event logger=\"TestLogger\" timestamp=\"{0:s}\" level=\"INFO\" thread=\"TestThread\" domain=\"Tests\" identity=\"TestRunner\" username=\"TestRunner\"><message>Test message</message><properties><data name=\"{1}\" value=\"{2}\" /></properties></event>\r\n",
-				XmlConvert.ToString(DateTime.Today, XmlDateTimeSerializationMode.Local),
+#if NET_2_0
+			    XmlConvert.ToString(DateTime.Today, XmlDateTimeSerializationMode.Local),
+#else
+			    XmlConvert.ToString(DateTime.Today),
+#endif
 				key,
 				value);
 		}