logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1538342 - in /logging/log4net/trunk: ./ src/ src/Appender/ src/Config/ src/Util/ src/Util/PatternStringConverters/ src/Util/TypeConverters/ tests/src/ tests/src/Filter/ tests/src/Util/
Date Sun, 03 Nov 2013 11:53:52 GMT
Author: bodewig
Date: Sun Nov  3 11:53:52 2013
New Revision: 1538342

URL: http://svn.apache.org/r1538342
Log:
remove the NET_2_0 symbol completely, enabling more stuff for Mono on the way

Removed:
    logging/log4net/trunk/tests/src/log4net.Tests.vs2003.csproj
Modified:
    logging/log4net/trunk/log4net.build
    logging/log4net/trunk/log4net.include
    logging/log4net/trunk/src/Appender/AdoNetAppender.cs
    logging/log4net/trunk/src/Appender/EventLogAppender.cs
    logging/log4net/trunk/src/AssemblyInfo.cs
    logging/log4net/trunk/src/Config/XmlConfigurator.cs
    logging/log4net/trunk/src/Util/PatternStringConverters/EnvironmentPatternConverter.cs
    logging/log4net/trunk/src/Util/SystemInfo.cs
    logging/log4net/trunk/src/Util/TypeConverters/IPAddressConverter.cs
    logging/log4net/trunk/src/log4net.vs2008.csproj
    logging/log4net/trunk/src/log4net.vs2010.csproj
    logging/log4net/trunk/tests/src/Filter/FilterTest.cs
    logging/log4net/trunk/tests/src/Util/EnvironmentPatternConverterTest.cs
    logging/log4net/trunk/tests/src/log4net.Tests.vs2008.csproj
    logging/log4net/trunk/tests/src/log4net.Tests.vs2010.csproj

Modified: logging/log4net/trunk/log4net.build
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/log4net.build?rev=1538342&r1=1538341&r2=1538342&view=diff
==============================================================================
--- logging/log4net/trunk/log4net.build (original)
+++ logging/log4net/trunk/log4net.build Sun Nov  3 11:53:52 2013
@@ -698,6 +698,7 @@ limitations under the License.
           <include name="System.Data.dll" />
           <include name="System.Web.dll" />
           <include name="System.Xml.dll" />
+          <include name="System.Configuration.dll" />
           <!-- allow for third party assemblies to be referenced by just storing them
in the lib/<framework family>/<framework version>/<build configuration>
directory -->
           <include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll"
/>
         </references>
@@ -720,6 +721,7 @@ limitations under the License.
         <include name="System.Data.dll" />
         <include name="System.Web.dll" />
         <include name="System.Xml.dll" />
+        <include name="System.Configuration.dll" />
         <!-- allow for third party assemblies to be referenced by just storing them in
the lib/<framework family>/<framework version>/<build configuration> directory
-->
         <include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll"
/>
       </references>
@@ -741,6 +743,7 @@ limitations under the License.
         <include name="System.Data.dll" />
         <include name="System.Web.dll" />
         <include name="System.Xml.dll" />
+        <include name="System.Configuration.dll" />
         <!-- allow for third party assemblies to be referenced by just storing them in
the lib/<framework family>/<framework version>/<build configuration> directory
-->
         <include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll"
/>
       </references>

Modified: logging/log4net/trunk/log4net.include
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/log4net.include?rev=1538342&r1=1538341&r2=1538342&view=diff
==============================================================================
--- logging/log4net/trunk/log4net.include (original)
+++ logging/log4net/trunk/log4net.include Sun Nov  3 11:53:52 2013
@@ -194,11 +194,11 @@ limitations under the License.
     <target name="set-net-2.0-runtime-configuration" depends="check-bin-dir, check-sdkdoc-dir,
check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
         <property name="nant.settings.currentframework" value="net-2.0" />
         <property name="current.build.debug" value="${build.debug}" dynamic="true" />
-        <property name="current.build.defines.csc" value="${build.defines.csc},NET,NET_2_0"
dynamic="true" />
-        <property name="current.build.defines.jsc" value="${build.defines.jsc},NET,NET_2_0"
dynamic="true" />
-        <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,NET_2_0=True"
dynamic="true" />
-        <property name="current.build.defines.vjc" value="${build.defines.vjc},NET,NET_2_0"
dynamic="true" />
-        <property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D
NET_2_0" dynamic="true" />
+        <property name="current.build.defines.csc" value="${build.defines.csc},NET" dynamic="true"
/>
+        <property name="current.build.defines.jsc" value="${build.defines.jsc},NET" dynamic="true"
/>
+        <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True"
dynamic="true" />
+        <property name="current.build.defines.vjc" value="${build.defines.vjc},NET" dynamic="true"
/>
+        <property name="current.build.defines.cl" value="${build.defines.cl} /D NET" dynamic="true"
/>
         <property name="current.bin.dir" value="${bin.dir}/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}"
/>
         <property name="current.sdkdoc.dir" value="${sdkdoc.dir}/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}"
/>
         <property name="current.sdkdoc.debug" value="${sdkdoc.debug}" dynamic="true" />
@@ -207,11 +207,11 @@ limitations under the License.
     <target name="set-net-3.5-runtime-configuration" depends="check-bin-dir, check-sdkdoc-dir,
check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
       <property name="nant.settings.currentframework" value="net-3.5" />
       <property name="current.build.debug" value="${build.debug}" dynamic="true" />
-      <property name="current.build.defines.csc" value="${build.defines.csc},NET,NET_2_0"
dynamic="true" />
-      <property name="current.build.defines.jsc" value="${build.defines.jsc},NET,NET_2_0"
dynamic="true" />
-      <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,NET_2_0=True"
dynamic="true" />
-      <property name="current.build.defines.vjc" value="${build.defines.vjc},NET,NET_2_0"
dynamic="true" />
-      <property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D NET_2_0"
dynamic="true" />
+      <property name="current.build.defines.csc" value="${build.defines.csc},NET" dynamic="true"
/>
+      <property name="current.build.defines.jsc" value="${build.defines.jsc},NET" dynamic="true"
/>
+      <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True"
dynamic="true" />
+      <property name="current.build.defines.vjc" value="${build.defines.vjc},NET" dynamic="true"
/>
+      <property name="current.build.defines.cl" value="${build.defines.cl} /D NET" dynamic="true"
/>
       <property name="current.bin.dir" value="${bin.dir}/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}"
/>
       <property name="current.sdkdoc.dir" value="${sdkdoc.dir}/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}"
/>      
       <property name="current.sdkdoc.debug" value="${sdkdoc.debug}" dynamic="true" />
@@ -220,11 +220,11 @@ limitations under the License.
     <target name="set-net-3.5-cp-runtime-configuration" depends="check-bin-dir, check-sdkdoc-dir,
check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
       <property name="nant.settings.currentframework" value="net-3.5" />
       <property name="current.build.debug" value="${build.debug}" dynamic="true" />
-      <property name="current.build.defines.csc" value="${build.defines.csc},NET,NET_2_0,CLIENT_PROFILE"
dynamic="true" />
-      <property name="current.build.defines.jsc" value="${build.defines.jsc},NET,NET_2_0,CLIENT_PROFILE"
dynamic="true" />
-      <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,NET_2_0=True,CLIENT_PROFILE=True"
dynamic="true" />
-      <property name="current.build.defines.vjc" value="${build.defines.vjc},NET,NET_2_0,CLIENT_PROFILE"
dynamic="true" />
-      <property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D NET_2_0
/D CLIENT_PROFILE" dynamic="true" />
+      <property name="current.build.defines.csc" value="${build.defines.csc},NET,CLIENT_PROFILE"
dynamic="true" />
+      <property name="current.build.defines.jsc" value="${build.defines.jsc},NET,CLIENT_PROFILE"
dynamic="true" />
+      <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,CLIENT_PROFILE=True"
dynamic="true" />
+      <property name="current.build.defines.vjc" value="${build.defines.vjc},NET,CLIENT_PROFILE"
dynamic="true" />
+      <property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D CLIENT_PROFILE"
dynamic="true" />
       <property name="current.bin.dir" value="${bin.dir}/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}"
/>
       <property name="current.sdkdoc.dir" value="${sdkdoc.dir}/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}"
/>      
       <property name="current.sdkdoc.debug" value="${sdkdoc.debug}" dynamic="true" />
@@ -233,11 +233,11 @@ limitations under the License.
     <target name="set-net-4.0-runtime-configuration" depends="check-bin-dir, check-sdkdoc-dir,
check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
       <property name="nant.settings.currentframework" value="net-4.0" />
       <property name="current.build.debug" value="${build.debug}" dynamic="true" />
-      <property name="current.build.defines.csc" value="${build.defines.csc},NET,NET_2_0,NET_4_0"
dynamic="true" />
-      <property name="current.build.defines.jsc" value="${build.defines.jsc},NET,NET_2_0,NET_4_0"
dynamic="true" />
-      <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,NET_2_0=True,NET_4_0=True"
dynamic="true" />
-      <property name="current.build.defines.vjc" value="${build.defines.vjc},NET,NET_2_0,NET_4_0"
dynamic="true" />
-      <property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D NET_2_0
/D NET_4_0" dynamic="true" />
+      <property name="current.build.defines.csc" value="${build.defines.csc},NET,NET_4_0"
dynamic="true" />
+      <property name="current.build.defines.jsc" value="${build.defines.jsc},NET,NET_4_0"
dynamic="true" />
+      <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,NET_4_0=True"
dynamic="true" />
+      <property name="current.build.defines.vjc" value="${build.defines.vjc},NET,NET_4_0"
dynamic="true" />
+      <property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D NET_4_0"
dynamic="true" />
       <property name="current.bin.dir" value="${bin.dir}/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}"
/>
       <property name="current.sdkdoc.dir" value="${sdkdoc.dir}/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}"
/>      
       <property name="current.sdkdoc.debug" value="${sdkdoc.debug}" dynamic="true" />
@@ -246,11 +246,11 @@ limitations under the License.
     <target name="set-net-4.0-cp-runtime-configuration" depends="check-bin-dir, check-sdkdoc-dir,
check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
       <property name="nant.settings.currentframework" value="net-4.0" />
       <property name="current.build.debug" value="${build.debug}" dynamic="true" />
-      <property name="current.build.defines.csc" value="${build.defines.csc},NET,NET_2_0,NET_4_0,CLIENT_PROFILE"
dynamic="true" />
-      <property name="current.build.defines.jsc" value="${build.defines.jsc},NET,NET_2_0,NET_4_0,CLIENT_PROFILE"
dynamic="true" />
-      <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,NET_2_0=True,NET_4_0=True,CLIENT_PROFILE=True"
dynamic="true" />
-      <property name="current.build.defines.vjc" value="${build.defines.vjc},NET,NET_2_0,NET_4_0,CLIENT_PROFILE"
dynamic="true" />
-      <property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D NET_2_0
/D NET_4_0 /D CLIENT_PROFILE" dynamic="true" />
+      <property name="current.build.defines.csc" value="${build.defines.csc},NET,NET_4_0,CLIENT_PROFILE"
dynamic="true" />
+      <property name="current.build.defines.jsc" value="${build.defines.jsc},NET,NET_4_0,CLIENT_PROFILE"
dynamic="true" />
+      <property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,NET_4_0=True,CLIENT_PROFILE=True"
dynamic="true" />
+      <property name="current.build.defines.vjc" value="${build.defines.vjc},NET,NET_4_0,CLIENT_PROFILE"
dynamic="true" />
+      <property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D NET_4_0
/D CLIENT_PROFILE" dynamic="true" />
       <property name="current.bin.dir" value="${bin.dir}/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}"
/>
       <property name="current.sdkdoc.dir" value="${sdkdoc.dir}/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}"
/>      
       <property name="current.sdkdoc.debug" value="${sdkdoc.debug}" dynamic="true" />

Modified: logging/log4net/trunk/src/Appender/AdoNetAppender.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Appender/AdoNetAppender.cs?rev=1538342&r1=1538341&r2=1538342&view=diff
==============================================================================
--- logging/log4net/trunk/src/Appender/AdoNetAppender.cs (original)
+++ logging/log4net/trunk/src/Appender/AdoNetAppender.cs Sun Nov  3 11:53:52 2013
@@ -179,7 +179,6 @@ namespace log4net.Appender
 	        set { m_appSettingsKey = value; }
 	    }
 
-#if NET_2_0
 	    /// <summary>
         /// The connectionStrings key from App.Config that contains the connection string.
 	    /// </summary>
@@ -191,7 +190,6 @@ namespace log4net.Appender
 	        get { return m_connectionStringName; }
 	        set { m_connectionStringName = value; }
 	    }
-#endif
 
 	    /// <summary>
 		/// Gets or sets the type name of the <see cref="IDbConnection"/> connection
@@ -646,7 +644,6 @@ namespace log4net.Appender
                 return m_connectionString;
             }
 
-#if NET_2_0
             if (!String.IsNullOrEmpty(m_connectionStringName))
             {
                 ConnectionStringSettings settings = ConfigurationManager.ConnectionStrings[m_connectionStringName];
@@ -660,7 +657,6 @@ namespace log4net.Appender
                     throw new LogException("Unable to find [" + m_connectionStringName +
"] ConfigurationManager.ConnectionStrings item");
                 }
             }
-#endif
 
             if (m_appSettingsKey != null && m_appSettingsKey.Length > 0)
             {
@@ -912,12 +908,10 @@ namespace log4net.Appender
         /// </summary>
         private string m_appSettingsKey;
 
-#if NET_2_0
         /// <summary>
         /// The connectionStrings key from App.Config that contains the connection string.
         /// </summary>
         private string m_connectionStringName;
-#endif
 
         /// <summary>
 		/// String type name of the <see cref="IDbConnection"/> type name.

Modified: logging/log4net/trunk/src/Appender/EventLogAppender.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Appender/EventLogAppender.cs?rev=1538342&r1=1538341&r2=1538342&view=diff
==============================================================================
--- logging/log4net/trunk/src/Appender/EventLogAppender.cs (original)
+++ logging/log4net/trunk/src/Appender/EventLogAppender.cs Sun Nov  3 11:53:52 2013
@@ -342,18 +342,11 @@ namespace log4net.Appender
 		/// <summary>
 		/// Create an event log source
 		/// </summary>
-		/// <remarks>
-		/// Uses different API calls under NET_2_0
-		/// </remarks>
 		private static void CreateEventSource(string source, string logName, string machineName)
 		{
-#if NET_2_0
 			EventSourceCreationData eventSourceCreationData = new EventSourceCreationData(source,
logName);
 			eventSourceCreationData.MachineName = machineName;
 			EventLog.CreateEventSource(eventSourceCreationData);
-#else
-			EventLog.CreateEventSource(source, logName, machineName);
-#endif
 		}
  
 		#region Override implementation of AppenderSkeleton

Modified: logging/log4net/trunk/src/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/AssemblyInfo.cs?rev=1538342&r1=1538341&r2=1538342&view=diff
==============================================================================
--- logging/log4net/trunk/src/AssemblyInfo.cs (original)
+++ logging/log4net/trunk/src/AssemblyInfo.cs Sun Nov  3 11:53:52 2013
@@ -54,18 +54,14 @@ using System.Runtime.CompilerServices;
 #else
 [assembly: AssemblyTitle("Apache log4net for .NET Framework 4.0")]
 #endif // Client Profile
-#elif (NET_2_0)
-#if CLIENT_PROFILE
+#elif CLIENT_PROFILE
 [assembly: AssemblyTitle("Apache log4net for .NET Framework 3.5 Client Profile")]
-#else
-[assembly: AssemblyTitle("Apache log4net for .NET Framework 2.0")]
-#endif // Client Profile
 #elif (NETCF_2_0)
 [assembly: AssemblyTitle("Apache log4net for .NET Compact Framework 2.0")]
 #elif (MONO_2_0)
 [assembly: AssemblyTitle("Apache log4net for Mono 2.0")]
 #else
-[assembly: AssemblyTitle("Apache log4net")]
+[assembly: AssemblyTitle("Apache log4net for .NET Framework 2.0")]
 #endif
 
 #if DEBUG

Modified: logging/log4net/trunk/src/Config/XmlConfigurator.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Config/XmlConfigurator.cs?rev=1538342&r1=1538341&r2=1538342&view=diff
==============================================================================
--- logging/log4net/trunk/src/Config/XmlConfigurator.cs (original)
+++ logging/log4net/trunk/src/Config/XmlConfigurator.cs Sun Nov  3 11:53:52 2013
@@ -169,11 +169,7 @@ namespace log4net.Config
 			try
 			{
 				XmlElement configElement = null;
-#if NET_2_0
 				configElement = System.Configuration.ConfigurationManager.GetSection("log4net") as XmlElement;
-#else
-				configElement = System.Configuration.ConfigurationSettings.GetConfig("log4net") as XmlElement;
-#endif
 				if (configElement == null)
 				{
 					// Failed to load the xml config using configuration settings handler
@@ -724,7 +720,7 @@ namespace log4net.Config
 #if (NETCF)
 					// Create a text reader for the file stream
 					XmlTextReader xmlReader = new XmlTextReader(configStream);
-#elif NET_2_0
+#else
 					// Allow the DTD to specify entity includes
 					XmlReaderSettings settings = new XmlReaderSettings();
                                         // .NET 4.0 warning CS0618: 'System.Xml.XmlReaderSettings.ProhibitDtd'
@@ -737,14 +733,6 @@ namespace log4net.Config
 
 					// Create a reader over the input stream
 					XmlReader xmlReader = XmlReader.Create(configStream, settings);
-#else
-					// Create a validating reader around a text reader for the file stream
-					XmlValidatingReader xmlReader = new XmlValidatingReader(new XmlTextReader(configStream));
-
-					// Specify that the reader should not perform validation, but that it should
-					// expand entity refs.
-					xmlReader.ValidationType = ValidationType.None;
-					xmlReader.EntityHandling = EntityHandling.ExpandEntities;
 #endif
 					
 					// load the data into the document

Modified: logging/log4net/trunk/src/Util/PatternStringConverters/EnvironmentPatternConverter.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Util/PatternStringConverters/EnvironmentPatternConverter.cs?rev=1538342&r1=1538341&r2=1538342&view=diff
==============================================================================
--- logging/log4net/trunk/src/Util/PatternStringConverters/EnvironmentPatternConverter.cs
(original)
+++ logging/log4net/trunk/src/Util/PatternStringConverters/EnvironmentPatternConverter.cs
Sun Nov  3 11:53:52 2013
@@ -65,7 +65,6 @@ namespace log4net.Util.PatternStringConv
 					// Lookup the environment variable
 					string envValue = Environment.GetEnvironmentVariable(this.Option);
 
-#if NET_2_0					
                     // If we didn't see it for the process, try a user level variable.
 				    if (envValue == null)
 				    {
@@ -77,7 +76,6 @@ namespace log4net.Util.PatternStringConv
 				    {
 				        envValue = Environment.GetEnvironmentVariable(this.Option, EnvironmentVariableTarget.Machine);
 				    }
-#endif					
 
 					if (envValue != null && envValue.Length > 0)
 					{

Modified: logging/log4net/trunk/src/Util/SystemInfo.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Util/SystemInfo.cs?rev=1538342&r1=1538341&r2=1538342&view=diff
==============================================================================
--- logging/log4net/trunk/src/Util/SystemInfo.cs (original)
+++ logging/log4net/trunk/src/Util/SystemInfo.cs Sun Nov  3 11:53:52 2013
@@ -922,21 +922,19 @@ namespace log4net.Util
 		/// </remarks>
 		public static string GetAppSetting(string key)
 		{
-			try
-			{
 #if NETCF
 				// Configuration APIs are not suported under the Compact Framework
-#elif NET_2_0
-				return ConfigurationManager.AppSettings[key];
 #else
-				return ConfigurationSettings.AppSettings[key];
-#endif
+			try
+			{
+				return ConfigurationManager.AppSettings[key];
 			}
 			catch(Exception ex)
 			{
 				// If an exception is thrown here then it looks like the config file does not parse correctly.
 				LogLog.Error(declaringType, "Exception while reading ConfigurationSettings. Check your
.config file is well formed XML.", ex);
 			}
+#endif
 			return null;
 		}
 

Modified: logging/log4net/trunk/src/Util/TypeConverters/IPAddressConverter.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Util/TypeConverters/IPAddressConverter.cs?rev=1538342&r1=1538341&r2=1538342&view=diff
==============================================================================
--- logging/log4net/trunk/src/Util/TypeConverters/IPAddressConverter.cs (original)
+++ logging/log4net/trunk/src/Util/TypeConverters/IPAddressConverter.cs Sun Nov  3 11:53:52
2013
@@ -77,8 +77,6 @@ namespace log4net.Util.TypeConverters
 			{
 				try
 				{
-#if NET_2_0 || NETCF_2_0
-
 #if !NETCF_2_0
 					// Try an explicit parse of string representation of an IPAddress (v4 or v6)
 					IPAddress result;
@@ -98,33 +96,6 @@ namespace log4net.Util.TypeConverters
 					{
 						return host.AddressList[0];
 					}
-#else
-					// Before .NET 2 we need to try to parse the IPAddress from the string first
-
-					// Check if the string only contains IP address valid chars
-					if (str.Trim(validIpAddressChars).Length == 0)
-					{
-						try
-						{
-							// try to parse the string as an IP address
-							return IPAddress.Parse(str);
-						}
-						catch(FormatException)
-						{
-							// Ignore a FormatException, try to resolve via DNS
-						}
-					}
-
-					// Try to resolve via DNS. This is a blocking call.
-					IPHostEntry host = Dns.GetHostByName(str);
-					if (host != null && 
-						host.AddressList != null && 
-						host.AddressList.Length > 0 &&
-						host.AddressList[0] != null)
-					{
-						return host.AddressList[0];
-					}
-#endif
 				}
 				catch(Exception ex)
 				{
@@ -136,9 +107,5 @@ namespace log4net.Util.TypeConverters
 
 		#endregion
 
-		/// <summary>
-		/// Valid characters in an IPv4 or IPv6 address string. (Does not support subnets)
-		/// </summary>
-		private static readonly char[] validIpAddressChars = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','A','B','C','D','E','F','x','X','.',':','%'};
 	}
 }

Modified: logging/log4net/trunk/src/log4net.vs2008.csproj
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/log4net.vs2008.csproj?rev=1538342&r1=1538341&r2=1538342&view=diff
==============================================================================
--- logging/log4net/trunk/src/log4net.vs2008.csproj (original)
+++ logging/log4net/trunk/src/log4net.vs2008.csproj Sun Nov  3 11:53:52 2013
@@ -56,7 +56,7 @@
     <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
     <ConfigurationOverrideFile>
     </ConfigurationOverrideFile>
-    <DefineConstants>TRACE;DEBUG;NET;NET_2_0</DefineConstants>
+    <DefineConstants>TRACE;DEBUG;NET</DefineConstants>
     <DocumentationFile>log4net.xml</DocumentationFile>
     <DebugSymbols>true</DebugSymbols>
     <FileAlignment>4096</FileAlignment>
@@ -75,7 +75,7 @@
     <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
     <ConfigurationOverrideFile>
     </ConfigurationOverrideFile>
-    <DefineConstants>TRACE;STRONG;NET;NET_2_0;</DefineConstants>
+    <DefineConstants>TRACE;STRONG;NET;</DefineConstants>
     <DocumentationFile>log4net.xml</DocumentationFile>
     <DebugSymbols>false</DebugSymbols>
     <FileAlignment>4096</FileAlignment>

Modified: logging/log4net/trunk/src/log4net.vs2010.csproj
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/log4net.vs2010.csproj?rev=1538342&r1=1538341&r2=1538342&view=diff
==============================================================================
--- logging/log4net/trunk/src/log4net.vs2010.csproj (original)
+++ logging/log4net/trunk/src/log4net.vs2010.csproj Sun Nov  3 11:53:52 2013
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -72,7 +72,7 @@
     <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
     <ConfigurationOverrideFile>
     </ConfigurationOverrideFile>
-    <DefineConstants>TRACE;DEBUG;NET;NET_2_0;NET_4_0</DefineConstants>
+    <DefineConstants>TRACE;DEBUG;NET;NET_4_0</DefineConstants>
     <DocumentationFile>log4net.xml</DocumentationFile>
     <DebugSymbols>true</DebugSymbols>
     <FileAlignment>4096</FileAlignment>
@@ -92,7 +92,7 @@
     <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
     <ConfigurationOverrideFile>
     </ConfigurationOverrideFile>
-    <DefineConstants>TRACE;STRONG;NET;NET_2_0;NET_4_0</DefineConstants>
+    <DefineConstants>TRACE;STRONG;NET;NET_4_0</DefineConstants>
     <DocumentationFile>log4net.xml</DocumentationFile>
     <DebugSymbols>false</DebugSymbols>
     <FileAlignment>4096</FileAlignment>

Modified: logging/log4net/trunk/tests/src/Filter/FilterTest.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/tests/src/Filter/FilterTest.cs?rev=1538342&r1=1538341&r2=1538342&view=diff
==============================================================================
--- logging/log4net/trunk/tests/src/Filter/FilterTest.cs (original)
+++ logging/log4net/trunk/tests/src/Filter/FilterTest.cs Sun Nov  3 11:53:52 2013
@@ -19,7 +19,7 @@
  *
 */
 
-#if NET_2_0
+#if !NETCF
 using System;
 using System.Collections.Generic;
 using System.Xml;

Modified: logging/log4net/trunk/tests/src/Util/EnvironmentPatternConverterTest.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/tests/src/Util/EnvironmentPatternConverterTest.cs?rev=1538342&r1=1538341&r2=1538342&view=diff
==============================================================================
--- logging/log4net/trunk/tests/src/Util/EnvironmentPatternConverterTest.cs (original)
+++ logging/log4net/trunk/tests/src/Util/EnvironmentPatternConverterTest.cs Sun Nov  3 11:53:52
2013
@@ -19,9 +19,7 @@
  *
 */
 
-// .NET Compact Framework 1.0 has no support for Environment.GetEnvironmentVariable()
-// .NET Framework version 1.0 / 1.1 do not have support for SetEnvironmentVariable which
is used in these tests.
-#if !NETCF && NET_2_0
+#if !NETCF
 
 using System;
 using System.IO;

Modified: logging/log4net/trunk/tests/src/log4net.Tests.vs2008.csproj
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/tests/src/log4net.Tests.vs2008.csproj?rev=1538342&r1=1538341&r2=1538342&view=diff
==============================================================================
--- logging/log4net/trunk/tests/src/log4net.Tests.vs2008.csproj (original)
+++ logging/log4net/trunk/tests/src/log4net.Tests.vs2008.csproj Sun Nov  3 11:53:52 2013
@@ -57,7 +57,7 @@
     <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
     <ConfigurationOverrideFile>
     </ConfigurationOverrideFile>
-    <DefineConstants>TRACE;DEBUG;NET_2_0</DefineConstants>
+    <DefineConstants>TRACE;DEBUG</DefineConstants>
     <DocumentationFile>
     </DocumentationFile>
     <DebugSymbols>true</DebugSymbols>

Modified: logging/log4net/trunk/tests/src/log4net.Tests.vs2010.csproj
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/tests/src/log4net.Tests.vs2010.csproj?rev=1538342&r1=1538341&r2=1538342&view=diff
==============================================================================
--- logging/log4net/trunk/tests/src/log4net.Tests.vs2010.csproj (original)
+++ logging/log4net/trunk/tests/src/log4net.Tests.vs2010.csproj Sun Nov  3 11:53:52 2013
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -72,7 +72,7 @@
     <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
     <ConfigurationOverrideFile>
     </ConfigurationOverrideFile>
-    <DefineConstants>TRACE;DEBUG;NET;NET_2_0;NET_4_0</DefineConstants>
+    <DefineConstants>TRACE;DEBUG;NET;NET_4_0</DefineConstants>
     <DocumentationFile>
     </DocumentationFile>
     <DebugSymbols>true</DebugSymbols>
@@ -93,7 +93,7 @@
     <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
     <ConfigurationOverrideFile>
     </ConfigurationOverrideFile>
-    <DefineConstants>TRACE;NET;NET_2_0;NET_4_0</DefineConstants>
+    <DefineConstants>TRACE;NET;NET_4_0</DefineConstants>
     <DocumentationFile>
     </DocumentationFile>
     <DebugSymbols>false</DebugSymbols>



Mime
View raw message