fixed choices deserialization
git-svn-id: https://svn.apache.org/repos/asf/chemistry/dotcmis/trunk@1183321 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/DotCMIS/binding/converter.cs b/DotCMIS/binding/converter.cs
index 609ea18..719c77d 100644
--- a/DotCMIS/binding/converter.cs
+++ b/DotCMIS/binding/converter.cs
@@ -79,6 +79,15 @@
}
/// <summary>
+ /// Deserializes a decimal.
+ /// </summary>
+ private static decimal? DeserializeDecimal(XmlElement element)
+ {
+ string s = DeserializeString(element);
+ return s == null ? (decimal?)null : Decimal.Parse(s);
+ }
+
+ /// <summary>
/// Deserializes a boolean.
/// </summary>
private static Boolean DeserializeBoolean(XmlElement element)
@@ -487,11 +496,11 @@
}
else if (element.LocalName.Equals("maxValue"))
{
- pd.MaxValue = DeserializeInteger(element);
+ pd.MaxValue = DeserializeDecimal(element);
}
else if (element.LocalName.Equals("minValue"))
{
- pd.MinValue = DeserializeInteger(element);
+ pd.MinValue = DeserializeDecimal(element);
}
else if (element.LocalName.Equals("precision"))
{
@@ -626,6 +635,14 @@
pd.Choices.Add(ConvertChoice(choice));
}
}
+ else if (element.LocalName.Equals("maxValue"))
+ {
+ pd.MaxValue = DeserializeInteger(element);
+ }
+ else if (element.LocalName.Equals("minValue"))
+ {
+ pd.MinValue = DeserializeInteger(element);
+ }
});
result = pd;