You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/09/29 16:16:42 UTC

ignite git commit: IGNITE-1567: More correct fix.

Repository: ignite
Updated Branches:
  refs/heads/ignite-1567 cfe6af02e -> e69afa1f1


IGNITE-1567: More correct fix.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e69afa1f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e69afa1f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e69afa1f

Branch: refs/heads/ignite-1567
Commit: e69afa1f1a926b0720cdd3b0bdc68c3b2583d5da
Parents: cfe6af0
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Sep 29 17:17:10 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Sep 29 17:17:10 2015 +0300

----------------------------------------------------------------------
 .../Impl/Portable/PortableSystemHandlers.cs     | 36 ++++++++++----------
 .../Impl/Portable/PortableWriterImpl.cs         |  2 +-
 2 files changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e69afa1f/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableSystemHandlers.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableSystemHandlers.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableSystemHandlers.cs
index e994e28..658d15d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableSystemHandlers.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableSystemHandlers.cs
@@ -208,43 +208,43 @@ namespace Apache.Ignite.Core.Impl.Portable
                 Type elemType = type.GetElementType();
                 
                 // Primitives.
-                if (elemType == typeof (bool[]))
+                if (elemType == typeof (bool))
                     return WriteBoolArray;
-                else if (elemType == typeof(byte[]))
+                else if (elemType == typeof(byte))
                     return WriteByteArray;
-                else if (elemType == typeof(short[]))
+                else if (elemType == typeof(short))
                     return WriteShortArray;
-                else if (elemType == typeof(char[]))
+                else if (elemType == typeof(char))
                     return WriteCharArray;
-                else if (elemType == typeof(int[]))
+                else if (elemType == typeof(int))
                     return WriteIntArray;
-                else if (elemType == typeof(long[]))
+                else if (elemType == typeof(long))
                     return WriteLongArray;
-                else if (elemType == typeof(float[]))
+                else if (elemType == typeof(float))
                     return WriteFloatArray;
-                else if (elemType == typeof(double[]))
+                else if (elemType == typeof(double))
                     return WriteDoubleArray;
                 // Non-CLS primitives.
-                else if (elemType == typeof(sbyte[]))
+                else if (elemType == typeof(sbyte))
                     return WriteSbyteArray;
-                else if (elemType == typeof(ushort[]))
+                else if (elemType == typeof(ushort))
                     return WriteUshortArray;
-                else if (elemType == typeof(uint[]))
+                else if (elemType == typeof(uint))
                     return WriteUintArray;
-                else if (elemType == typeof(ulong[]))
+                else if (elemType == typeof(ulong))
                     return WriteUlongArray;
                 // Special types.
-                else if (elemType == typeof (decimal[]))
+                else if (elemType == typeof (decimal))
                     return WriteDecimalArray;
-                else if (elemType == typeof(string[]))
+                else if (elemType == typeof(string))
                     return WriteStringArray;
-                else if (elemType == typeof(DateTime[]))
+                else if (elemType == typeof(DateTime))
                     return WriteDateArray;
-                else if (elemType == typeof(DateTime?[]))
+                else if (elemType == typeof(DateTime?))
                     return WriteNullableDateArray;
-                else if (elemType == typeof(Guid[]))
+                else if (elemType == typeof(Guid))
                     return WriteGuidArray;
-                else if (elemType == typeof(Guid?[]))
+                else if (elemType == typeof(Guid?))
                     return WriteNullableGuidArray;
                 // Enums.
                 if (elemType.IsEnum)

http://git-wip-us.apache.org/repos/asf/ignite/blob/e69afa1f/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableWriterImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableWriterImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableWriterImpl.cs
index a0cf4e1..e55cc9d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableWriterImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableWriterImpl.cs
@@ -1586,7 +1586,7 @@ namespace Apache.Ignite.Core.Impl.Portable
                 // Collections, Enums and non-primitive arrays do not have descriptors
                 // and this is fine here because we cannot know whether their members
                 // are portable.
-                return _marsh.Descriptor(type) != null;
+                return _marsh.Descriptor(type) != null || PortableSystemHandlers.GetWriteHandler(type) != null;
             }
 
             return true;