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/05/16 23:04:49 UTC
cvs commit: logging-log4net/src/Util PropertiesDictionary.cs
nicko 2004/05/16 14:04:49
Modified: src/Util PropertiesDictionary.cs
Log:
Fixed bug where the dictionary entry key is not decoded correctly on deserialisation
Revision Changes Path
1.5 +4 -1 logging-log4net/src/Util/PropertiesDictionary.cs
Index: PropertiesDictionary.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/Util/PropertiesDictionary.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- PropertiesDictionary.cs 18 Apr 2004 18:34:58 -0000 1.4
+++ PropertiesDictionary.cs 16 May 2004 21:04:49 -0000 1.5
@@ -67,7 +67,8 @@
{
foreach(SerializationEntry entry in info)
{
- m_ht[XmlConvert.EncodeLocalName(entry.Name)] = entry.Value;
+ // The keys are stored as Xml encoded names
+ m_ht[XmlConvert.DecodeName(entry.Name)] = entry.Value;
}
}
#endif
@@ -124,6 +125,8 @@
// If value is serializable then we add it to the list
if (entry.Value.GetType().IsSerializable)
{
+ // Store the keys as an Xml encoded local name as it may contain colons (':')
+ // which are not escaped by the Xml Serialisation framework
info.AddValue(XmlConvert.EncodeLocalName(entry.Key as string), entry.Value);
}
}