Author: fmui
Date: Fri Jul 1 09:51:38 2016
New Revision: 1750896
URL: http://svn.apache.org/viewvc?rev=1750896&view=rev
Log:
CMIS-984: make type type conversion work on x86 target
Modified:
chemistry/portcmis/trunk/PortCMIS/data/DataImpl.cs
Modified: chemistry/portcmis/trunk/PortCMIS/data/DataImpl.cs
URL:
http://svn.apache.org/viewvc/chemistry/portcmis/trunk/PortCMIS/data/DataImpl.cs?rev=1750896&r1=1750895&r2=1750896&view=diff
==============================================================================
--- chemistry/portcmis/trunk/PortCMIS/data/DataImpl.cs (original)
+++ chemistry/portcmis/trunk/PortCMIS/data/DataImpl.cs Fri Jul 1 09:51:38 2016
@@ -1075,7 +1075,7 @@ namespace PortCMIS.Data
}
else
{
- return new BigInteger((long)value);
+ return new BigInteger(Convert.ToInt64(value));
}
case PropertyType.Boolean:
if (!(value is bool))
@@ -1090,11 +1090,11 @@ namespace PortCMIS.Data
}
return value;
case PropertyType.Decimal:
- if (!(value is decimal || value is double || value is
float))
+ if (!(value is decimal || value is double || value is
float || value is sbyte || value is byte || value is short || value is ushort
|| value is int || value is uint || value is long))
{
throw new ArgumentException("Property '" + Id + "' is
a Decimal property!");
}
- return (decimal)value;
+ return Convert.ToDecimal(value);
case PropertyType.Uri:
if (!(value is string))
{
@@ -1190,7 +1190,7 @@ namespace PortCMIS.Data
/// <inheritdoc/>
public override string ToString()
{
- return "Content Stream : " + FileName + " (" +MimeType +") " +
+ return "Content Stream : " + FileName + " (" + MimeType + ") " +
(Length == null ? "" : Length + " bytes" +
(Stream == null ? " no stream" : Stream.ToString()));
}