IGNITE-1619: Fix to DateTime serialization.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fd3b8070 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fd3b8070 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fd3b8070 Branch: refs/heads/ignite-1655 Commit: fd3b80705235ffedc0e4cd0e8fd6bc77de27ba09 Parents: 91f244e Author: vozerov-gridgain <[email protected]> Authored: Fri Oct 23 11:47:31 2015 +0300 Committer: vozerov-gridgain <[email protected]> Committed: Fri Oct 23 11:47:31 2015 +0300 ---------------------------------------------------------------------- .../Portable/PortableSelfTest.cs | 15 +-------------- .../Impl/Portable/PortableSystemHandlers.cs | 8 ++++---- 2 files changed, 5 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/fd3b8070/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Portable/PortableSelfTest.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Portable/PortableSelfTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Portable/PortableSelfTest.cs index 3d33682..62d52f6 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Portable/PortableSelfTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Portable/PortableSelfTest.cs @@ -498,20 +498,7 @@ namespace Apache.Ignite.Core.Tests.Portable Assert.AreEqual(vals, newVals); } - - /** - * <summary>Check write of date.</summary> - */ - [Test] - public void TestWriteDate() - { - DateTime time = DateTime.Now; - DateTime timeUtc = DateTime.UtcNow; - - Assert.AreEqual(_marsh.Unmarshal<DateTime>(_marsh.Marshal(time)), time); - Assert.AreEqual(_marsh.Unmarshal<DateTime>(_marsh.Marshal(timeUtc)), timeUtc); - } - + /// <summary> /// Test object with dates. /// </summary> http://git-wip-us.apache.org/repos/asf/ignite/blob/fd3b8070/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 6ad4aad..ed2e9ea 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableSystemHandlers.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableSystemHandlers.cs @@ -162,13 +162,13 @@ namespace Apache.Ignite.Core.Impl.Portable private static PortableSystemWriteDelegate FindWriteHandler(Type type) { // 1. Well-known types. - if (type == typeof (string)) + if (type == typeof(string)) return WriteString; - if (type == typeof(decimal?)) + if (type == typeof(decimal)) return WriteDecimal; - if (type == typeof(DateTime?)) + if (type == typeof(DateTime)) return WriteDate; - if (type == typeof(Guid?)) + if (type == typeof(Guid)) return WriteGuid; if (type == typeof (PortableUserObject)) return WritePortable;
