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 2004/04/18 20:34:58 UTC

cvs commit: logging-log4net/src/Util PropertiesDictionary.cs

nicko       2004/04/18 11:34:58

  Modified:    src/Util PropertiesDictionary.cs
  Log:
  Fixed issue with SerializationInfo keys, must be valid XML Qnames otherwize SOAP serialization fails
  
  Revision  Changes    Path
  1.4       +3 -2      logging-log4net/src/Util/PropertiesDictionary.cs
  
  Index: PropertiesDictionary.cs
  ===================================================================
  RCS file: /home/cvs/logging-log4net/src/Util/PropertiesDictionary.cs,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PropertiesDictionary.cs	23 Feb 2004 03:18:04 -0000	1.3
  +++ PropertiesDictionary.cs	18 Apr 2004 18:34:58 -0000	1.4
  @@ -20,6 +20,7 @@
   using System.Collections;
   #if !NETCF
   using System.Runtime.Serialization;
  +using System.Xml;
   #endif
   
   namespace log4net.Util
  @@ -66,7 +67,7 @@
   		{
   			foreach(SerializationEntry entry in info)
   			{
  -				m_ht[entry.Name] = entry.Value;
  +				m_ht[XmlConvert.EncodeLocalName(entry.Name)] = entry.Value;
   			}
   		}
   #endif
  @@ -123,7 +124,7 @@
   				// If value is serializable then we add it to the list
   				if (entry.Value.GetType().IsSerializable)
   				{
  -					info.AddValue(entry.Key as string, entry.Value);
  +					info.AddValue(XmlConvert.EncodeLocalName(entry.Key as string), entry.Value);
   				}
   			}
   		}