ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [31/50] [abbrv] ignite git commit: IGNITE-1655: Removed "local" flag.
Date Fri, 23 Oct 2015 08:47:57 GMT
IGNITE-1655: Removed "local" flag.


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

Branch: refs/heads/ignite-1655
Commit: 9a957cc9fad85eab16da0138e662873385dbabad
Parents: b34657f
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Wed Oct 21 12:28:22 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Wed Oct 21 12:28:22 2015 +0300

----------------------------------------------------------------------
 .../Portable/PortableSelfTest.cs                | 42 +++-----------------
 .../Portable/IPortableRawReader.cs              | 18 +--------
 .../Portable/IPortableReader.cs                 | 18 +--------
 3 files changed, 9 insertions(+), 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9a957cc9/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 464b84e..6e6da13 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Portable/PortableSelfTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Portable/PortableSelfTest.cs
@@ -530,18 +530,12 @@ namespace Apache.Ignite.Core.Tests.Portable
 
             DateTimeType otherObj = marsh.Unmarshal<DateTimeType>(marsh.Marshal(obj));
 
-            Assert.AreEqual(obj.Loc, otherObj.Loc);
             Assert.AreEqual(obj.Utc, otherObj.Utc);
-            Assert.AreEqual(obj.LocNull, otherObj.LocNull);
             Assert.AreEqual(obj.UtcNull, otherObj.UtcNull);            
-            Assert.AreEqual(obj.LocArr, otherObj.LocArr);
             Assert.AreEqual(obj.UtcArr, otherObj.UtcArr);
 
-            Assert.AreEqual(obj.LocRaw, otherObj.LocRaw);
             Assert.AreEqual(obj.UtcRaw, otherObj.UtcRaw);
-            Assert.AreEqual(obj.LocNullRaw, otherObj.LocNullRaw);
             Assert.AreEqual(obj.UtcNullRaw, otherObj.UtcNullRaw);
-            Assert.AreEqual(obj.LocArrRaw, otherObj.LocArrRaw);
             Assert.AreEqual(obj.UtcArrRaw, otherObj.UtcArrRaw);
         }
 
@@ -1985,22 +1979,16 @@ namespace Apache.Ignite.Core.Tests.Portable
         /// </summary>
         public class DateTimeType : IPortableMarshalAware
         {
-            public DateTime Loc;
             public DateTime Utc;
 
-            public DateTime? LocNull;
             public DateTime? UtcNull;
 
-            public DateTime?[] LocArr;
             public DateTime?[] UtcArr;
 
-            public DateTime LocRaw;
             public DateTime UtcRaw;
 
-            public DateTime? LocNullRaw;
             public DateTime? UtcNullRaw;
 
-            public DateTime?[] LocArrRaw;
             public DateTime?[] UtcArrRaw;
 
             /// <summary>
@@ -2009,63 +1997,45 @@ namespace Apache.Ignite.Core.Tests.Portable
             /// <param name="now">Current local time.</param>
             public DateTimeType(DateTime now)
             {
-                Loc = now;
                 Utc = now.ToUniversalTime();
 
-                LocNull = Loc;
                 UtcNull = Utc;
 
-                LocArr = new DateTime?[] { Loc };
                 UtcArr = new DateTime?[] { Utc };
 
-                LocRaw = Loc;
                 UtcRaw = Utc;
 
-                LocNullRaw = LocNull;
                 UtcNullRaw = UtcNull;
 
-                LocArrRaw = new[] { LocArr[0] };
                 UtcArrRaw = new[] { UtcArr[0] };
             }
 
             /** <inheritDoc /> */
             public void WritePortable(IPortableWriter writer)
             {
-                writer.WriteTimestamp("loc", Loc);
                 writer.WriteTimestamp("utc", Utc);
-                writer.WriteTimestamp("locNull", LocNull);
                 writer.WriteTimestamp("utcNull", UtcNull);
-                writer.WriteTimestampArray("locArr", LocArr);
                 writer.WriteTimestampArray("utcArr", UtcArr);
 
                 IPortableRawWriter rawWriter = writer.GetRawWriter();
 
-                rawWriter.WriteTimestamp(LocRaw);
                 rawWriter.WriteTimestamp(UtcRaw);
-                rawWriter.WriteTimestamp(LocNullRaw);
                 rawWriter.WriteTimestamp(UtcNullRaw);
-                rawWriter.WriteTimestampArray(LocArrRaw);
                 rawWriter.WriteTimestampArray(UtcArrRaw);
             }
 
             /** <inheritDoc /> */
             public void ReadPortable(IPortableReader reader)
             {
-                Loc = reader.ReadTimestamp("loc", true).Value;
-                Utc = reader.ReadTimestamp("utc", false).Value;
-                LocNull = reader.ReadTimestamp("loc", true).Value;
-                UtcNull = reader.ReadTimestamp("utc", false).Value;
-                LocArr = reader.ReadTimestampArray("locArr", true);
-                UtcArr = reader.ReadTimestampArray("utcArr", false);
+                Utc = reader.ReadTimestamp("utc").Value;
+                UtcNull = reader.ReadTimestamp("utc").Value;
+                UtcArr = reader.ReadTimestampArray("utcArr");
 
                 IPortableRawReader rawReader = reader.GetRawReader();
 
-                LocRaw = rawReader.ReadTimestamp(true).Value;
-                UtcRaw = rawReader.ReadTimestamp(false).Value;
-                LocNullRaw = rawReader.ReadTimestamp(true).Value;
-                UtcNullRaw = rawReader.ReadTimestamp(false).Value;
-                LocArrRaw = rawReader.ReadTimestampArray(true);
-                UtcArrRaw = rawReader.ReadTimestampArray(false);
+                UtcRaw = rawReader.ReadTimestamp().Value;
+                UtcNullRaw = rawReader.ReadTimestamp().Value;
+                UtcArrRaw = rawReader.ReadTimestampArray();
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9a957cc9/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableRawReader.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableRawReader.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableRawReader.cs
index f4cf8ba..1d0daa5 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableRawReader.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableRawReader.cs
@@ -139,27 +139,13 @@ namespace Apache.Ignite.Core.Portable
         /// </summary>
         /// <returns>Date value.</returns>
         DateTime? ReadTimestamp();
-
-        /// <summary>
-        /// Read date value.
-        /// </summary>
-        /// <param name="local">Whether to read date in local (<c>true</c>)
or UTC (<c>false</c>) form.</param>
-        /// <returns></returns>
-        DateTime? ReadTimestamp(bool local);
-
+        
         /// <summary>
         /// Read date array in UTC form. Shortcut for <c>ReadTimestampArray(false)</c>.
         /// </summary>
         /// <returns>Date array.</returns>
         DateTime?[] ReadTimestampArray();
-
-        /// <summary>
-        /// Read date array.
-        /// </summary>
-        /// <param name="local">Whether to read date array in local (<c>true</c>)
or UTC (<c>false</c>) form.</param>
-        /// <returns>Date array.</returns>
-        DateTime?[] ReadTimestampArray(bool local);
-
+        
         /// <summary>
         /// Read string value. 
         /// </summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/9a957cc9/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableReader.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableReader.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableReader.cs
index d913a06..2e090bf 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableReader.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableReader.cs
@@ -190,15 +190,7 @@ namespace Apache.Ignite.Core.Portable
         /// <param name="fieldName">Field name.</param>
         /// <returns>Date value.</returns>
         DateTime? ReadTimestamp(string fieldName);
-
-        /// <summary>
-        /// Read named date value.
-        /// </summary>
-        /// <param name="fieldName">Field name.</param>
-        /// <param name="local">Whether to read date in local (<c>true</c>)
or UTC (<c>false</c>) form.</param>
-        /// <returns>Date vaule.</returns>
-        DateTime? ReadTimestamp(string fieldName, bool local);
-
+        
         /// <summary>
         /// Read named date array in UTC form.
         /// </summary>
@@ -207,14 +199,6 @@ namespace Apache.Ignite.Core.Portable
         DateTime?[] ReadTimestampArray(string fieldName);
 
         /// <summary>
-        /// Read named date array.
-        /// </summary>
-        /// <param name="fieldName">Field name.</param>
-        /// <param name="local">Whether to read date in local (<c>true</c>)
or UTC (<c>false</c>) form.</param>
-        /// <returns>Date array.</returns>
-        DateTime?[] ReadTimestampArray(string fieldName, bool local);
-
-        /// <summary>
         /// Read named string value.
         /// </summary>
         /// <param name="fieldName">Field name.</param>


Mime
View raw message