Skip to content

Commit

Permalink
Fixes #72
Browse files Browse the repository at this point in the history
  • Loading branch information
scottdurow committed Oct 21, 2015
1 parent 5a3dc41 commit a2c9cbf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions SparkleXrmSource/SparkleXrm/Sdk/Attribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Attribute(string attributeName, string typeName)

#region Methods
public static object DeSerialise(XmlNode node,string overrideType)
{
{
// Check if the value is null
bool isNil = (XmlHelper.GetAttributeValue(node, "i:nil") == "true");
object value = null;
Expand All @@ -65,6 +65,9 @@ public static object DeSerialise(XmlNode node,string overrideType)
case AttributeTypes.Boolean_:
value = (stringValue == "true");
break;
case AttributeTypes.Double_:
value = double.Parse(stringValue);
break;
case AttributeTypes.Decimal_:
value = decimal.Parse(stringValue);
break;
Expand Down Expand Up @@ -267,6 +270,7 @@ private static string _addNsPrefix(string type)
case "DateTime":
case AttributeTypes.String_:
case AttributeTypes.Decimal_:
case AttributeTypes.Double_:
case AttributeTypes.Boolean_:
case AttributeTypes.DateTime_:
case AttributeTypes.Guid_:
Expand All @@ -279,7 +283,7 @@ private static string _addNsPrefix(string type)
case AttributeTypes.Money:
return "a:" + type;
}
throw new Exception("Could add node prefix for type " + type);
throw new Exception("Could not add node prefix for type " + type);
}
#endregion
}
Expand Down

0 comments on commit a2c9cbf

Please sign in to comment.