ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [07/43] ignite git commit: IGNITE-2324: .NET: Minor fixes as per static code analysis. This closes #436.
Date Thu, 11 Feb 2016 23:27:42 GMT
IGNITE-2324: .NET: Minor fixes as per static code analysis.  This closes #436.


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

Branch: refs/heads/ignite-2249
Commit: 42109899a26989aa0d2affff27d327973ea489b2
Parents: cc5067b
Author: Pavel Tupitsyn <ptupitsyn@gridgain.com>
Authored: Fri Feb 5 17:02:31 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Fri Feb 5 17:02:31 2016 +0300

----------------------------------------------------------------------
 .../Cache/CachePartialUpdateException.cs        |   1 -
 .../Cache/Store/CacheStoreAdapter.cs            |   1 -
 .../Compute/ComputeTaskAdapter.cs               |   1 -
 .../Compute/ComputeTaskSplitAdapter.cs          |   1 -
 .../Apache.Ignite.Core/Events/EventBase.cs      |   1 -
 .../Apache.Ignite.Core/Impl/Common/Future.cs    |  14 +-
 .../Impl/Common/FutureType.cs                   |  18 +-
 .../Closure/ComputeAbstractClosureTask.cs       |   1 -
 .../Apache.Ignite.Core/Impl/Handle/Handle.cs    |   8 +-
 .../Impl/Memory/PlatformMemoryStream.cs         | 320 +++++++++++++++----
 10 files changed, 291 insertions(+), 75 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/42109899/modules/platforms/dotnet/Apache.Ignite.Core/Cache/CachePartialUpdateException.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/CachePartialUpdateException.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/CachePartialUpdateException.cs
index b80913f..907af14 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/CachePartialUpdateException.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/CachePartialUpdateException.cs
@@ -22,7 +22,6 @@ namespace Apache.Ignite.Core.Cache
     using System.Diagnostics.CodeAnalysis;
     using System.Linq;
     using System.Runtime.Serialization;
-    using Apache.Ignite.Core.Impl.Common;
 
     /// <summary>
     /// Exception thrown from non-transactional cache in case when update succeeded only
partially.

http://git-wip-us.apache.org/repos/asf/ignite/blob/42109899/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Store/CacheStoreAdapter.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Store/CacheStoreAdapter.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Store/CacheStoreAdapter.cs
index 3f3b558..a38678d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Store/CacheStoreAdapter.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Store/CacheStoreAdapter.cs
@@ -21,7 +21,6 @@ namespace Apache.Ignite.Core.Cache.Store
     using System.Collections;
     using System.Diagnostics.CodeAnalysis;
     using System.Linq;
-    using Apache.Ignite.Core.Impl.Common;
 
     /// <summary>
     /// Cache storage convenience adapter. It provides default implementation for 

http://git-wip-us.apache.org/repos/asf/ignite/blob/42109899/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskAdapter.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskAdapter.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskAdapter.cs
index f2d2e14..79f32a6 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskAdapter.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskAdapter.cs
@@ -22,7 +22,6 @@ namespace Apache.Ignite.Core.Compute
     using System.Diagnostics.CodeAnalysis;
     using Apache.Ignite.Core.Cluster;
     using Apache.Ignite.Core.Common;
-    using Apache.Ignite.Core.Impl.Common;
 
     /// <summary>
     /// Convenience adapter for <see cref="IComputeTask{TArg,TJobRes,TTaskRes}"/> interface

http://git-wip-us.apache.org/repos/asf/ignite/blob/42109899/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskSplitAdapter.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskSplitAdapter.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskSplitAdapter.cs
index bc152b5..f6a2f07 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskSplitAdapter.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Compute/ComputeTaskSplitAdapter.cs
@@ -22,7 +22,6 @@ namespace Apache.Ignite.Core.Compute
     using Apache.Ignite.Core.Cluster;
     using Apache.Ignite.Core.Common;
     using Apache.Ignite.Core.Impl;
-    using Apache.Ignite.Core.Impl.Common;
     using Apache.Ignite.Core.Impl.Compute;
 
     /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/42109899/modules/platforms/dotnet/Apache.Ignite.Core/Events/EventBase.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Events/EventBase.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Events/EventBase.cs
index 962d577..ed60332 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Events/EventBase.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Events/EventBase.cs
@@ -25,7 +25,6 @@ namespace Apache.Ignite.Core.Events
     using Apache.Ignite.Core.Cluster;
     using Apache.Ignite.Core.Common;
     using Apache.Ignite.Core.Impl.Binary;
-    using Apache.Ignite.Core.Impl.Common;
 
     /// <summary>
     /// Base event implementation.

http://git-wip-us.apache.org/repos/asf/ignite/blob/42109899/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/Future.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/Future.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/Future.cs
index 7e6f418..746577a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/Future.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/Future.cs
@@ -89,7 +89,10 @@ namespace Apache.Ignite.Core.Impl.Common
             return Task;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Set result from stream.
+        /// </summary>
+        /// <param name="stream">Stream.</param>
         [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
         public void OnResult(IBinaryStream stream)
         {
@@ -103,7 +106,10 @@ namespace Apache.Ignite.Core.Impl.Common
             }
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Set error result.
+        /// </summary>
+        /// <param name="err">Exception.</param>
         public void OnError(Exception err)
         {
             if (err is IgniteFutureCancelledException)
@@ -112,7 +118,9 @@ namespace Apache.Ignite.Core.Impl.Common
                 _taskCompletionSource.TrySetException(err);
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Set null result.
+        /// </summary>
         [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
         public void OnNullResult()
         {

http://git-wip-us.apache.org/repos/asf/ignite/blob/42109899/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/FutureType.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/FutureType.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/FutureType.cs
index c9f1555..c1649c9 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/FutureType.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Common/FutureType.cs
@@ -25,31 +25,31 @@ namespace Apache.Ignite.Core.Impl.Common
     [SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Justification
= "Interoperability")]
     public enum FutureType
     {
-        /** Future type: byte. */
+        /// <summary> Future type: byte. </summary>
         Byte = 1,
 
-        /** Future type: boolean. */
+        /// <summary> Future type: boolean. </summary>
         Bool = 2,
 
-        /** Future type: short. */
+        /// <summary> Future type: short. </summary>
         Short = 3,
 
-        /** Future type: char. */
+        /// <summary> Future type: char. </summary>
         Char = 4,
 
-        /** Future type: int. */
+        /// <summary> Future type: int. </summary>
         Int = 5,
 
-        /** Future type: float. */
+        /// <summary> Future type: float. </summary>
         Float = 6,
 
-        /** Future type: long. */
+        /// <summary> Future type: long. </summary>
         Long = 7,
 
-        /** Future type: double. */
+        /// <summary> Future type: double. </summary>
         Double = 8,
 
-        /** Future type: object. */
+        /// <summary> Future type: object. </summary>
         Object = 9
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/42109899/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeAbstractClosureTask.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeAbstractClosureTask.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeAbstractClosureTask.cs
index 220dbf8..c967c7b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeAbstractClosureTask.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeAbstractClosureTask.cs
@@ -22,7 +22,6 @@ namespace Apache.Ignite.Core.Impl.Compute.Closure
     using System.Diagnostics.CodeAnalysis;
     using Apache.Ignite.Core.Cluster;
     using Apache.Ignite.Core.Compute;
-    using Apache.Ignite.Core.Impl.Common;
 
     /// <summary>
     /// Base class for all tasks working with closures.

http://git-wip-us.apache.org/repos/asf/ignite/blob/42109899/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Handle/Handle.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Handle/Handle.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Handle/Handle.cs
index 0168963..fb56891 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Handle/Handle.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Handle/Handle.cs
@@ -53,14 +53,18 @@ namespace Apache.Ignite.Core.Impl.Handle
             get { return _target; }
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Release the resource.
+        /// </summary>
         public void Release()
         {
             if (Interlocked.CompareExchange(ref _released, 1, 0) == 0)
                 _releaseAction(_target);
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Resource released flag.
+        /// </summary>
         public bool Released
         {
             get { return Thread.VolatileRead(ref _released) == 1; }

http://git-wip-us.apache.org/repos/asf/ignite/blob/42109899/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryStream.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryStream.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryStream.cs
index ba0da19..5ad033e 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryStream.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Memory/PlatformMemoryStream.cs
@@ -83,7 +83,10 @@ namespace Apache.Ignite.Core.Impl.Memory
 
         #region WRITE
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write byte.
+        /// </summary>
+        /// <param name="val">Byte value.</param>
         public void WriteByte(byte val)
         {
             int curPos = EnsureWriteCapacityAndShift(Len1);
@@ -91,7 +94,10 @@ namespace Apache.Ignite.Core.Impl.Memory
             *(_data + curPos) = val;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write byte array.
+        /// </summary>
+        /// <param name="val">Byte array.</param>
         public void WriteByteArray(byte[] val)
         {
             IgniteArgumentCheck.NotNull(val, "val");
@@ -102,13 +108,19 @@ namespace Apache.Ignite.Core.Impl.Memory
             }
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write bool.
+        /// </summary>
+        /// <param name="val">Bool value.</param>
         public void WriteBool(bool val)
         {
             WriteByte(val ? (byte)1 : (byte)0);
         }
-        
-        /** <inheritdoc /> */
+
+        /// <summary>
+        /// Write bool array.
+        /// </summary>
+        /// <param name="val">Bool array.</param>
         public void WriteBoolArray(bool[] val)
         {
             IgniteArgumentCheck.NotNull(val, "val");
@@ -119,7 +131,10 @@ namespace Apache.Ignite.Core.Impl.Memory
             }
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write short.
+        /// </summary>
+        /// <param name="val">Short value.</param>
         public virtual void WriteShort(short val)
         {
             int curPos = EnsureWriteCapacityAndShift(Len2);
@@ -127,7 +142,10 @@ namespace Apache.Ignite.Core.Impl.Memory
             *((short*)(_data + curPos)) = val;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write short array.
+        /// </summary>
+        /// <param name="val">Short array.</param>
         public virtual void WriteShortArray(short[] val)
         {
             IgniteArgumentCheck.NotNull(val, "val");
@@ -138,7 +156,10 @@ namespace Apache.Ignite.Core.Impl.Memory
             }
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write char.
+        /// </summary>
+        /// <param name="val">Char value.</param>
         public virtual void WriteChar(char val)
         {
             int curPos = EnsureWriteCapacityAndShift(Len2);
@@ -146,7 +167,10 @@ namespace Apache.Ignite.Core.Impl.Memory
             *((char*)(_data + curPos)) = val;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write char array.
+        /// </summary>
+        /// <param name="val">Char array.</param>
         public virtual void WriteCharArray(char[] val)
         {
             IgniteArgumentCheck.NotNull(val, "val");
@@ -157,7 +181,10 @@ namespace Apache.Ignite.Core.Impl.Memory
             }
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write int.
+        /// </summary>
+        /// <param name="val">Int value.</param>
         public virtual void WriteInt(int val)
         {
             int curPos = EnsureWriteCapacityAndShift(Len4);
@@ -165,7 +192,11 @@ namespace Apache.Ignite.Core.Impl.Memory
             *((int*)(_data + curPos)) = val;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write int to specific position.
+        /// </summary>
+        /// <param name="writePos">Position.</param>
+        /// <param name="val">Value.</param>
         [SuppressMessage("Microsoft.Usage", "CA2233:OperationsShouldNotOverflow", MessageId
= "writePos+4")]
         public virtual void WriteInt(int writePos, int val)
         {
@@ -174,7 +205,10 @@ namespace Apache.Ignite.Core.Impl.Memory
             *((int*)(_data + writePos)) = val;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write int array.
+        /// </summary>
+        /// <param name="val">Int array.</param>
         public virtual void WriteIntArray(int[] val)
         {
             IgniteArgumentCheck.NotNull(val, "val");
@@ -185,7 +219,10 @@ namespace Apache.Ignite.Core.Impl.Memory
             }
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write long.
+        /// </summary>
+        /// <param name="val">Long value.</param>
         public virtual void WriteLong(long val)
         {
             int curPos = EnsureWriteCapacityAndShift(Len8);
@@ -193,7 +230,10 @@ namespace Apache.Ignite.Core.Impl.Memory
             *((long*)(_data + curPos)) = val;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write long array.
+        /// </summary>
+        /// <param name="val">Long array.</param>
         public virtual void WriteLongArray(long[] val)
         {
             IgniteArgumentCheck.NotNull(val, "val");
@@ -204,7 +244,10 @@ namespace Apache.Ignite.Core.Impl.Memory
             }
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write float.
+        /// </summary>
+        /// <param name="val">Float value.</param>
         public virtual void WriteFloat(float val)
         {
             int curPos = EnsureWriteCapacityAndShift(Len4);
@@ -212,7 +255,10 @@ namespace Apache.Ignite.Core.Impl.Memory
             *((float*)(_data + curPos)) = val;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write float array.
+        /// </summary>
+        /// <param name="val">Float array.</param>
         public virtual void WriteFloatArray(float[] val)
         {
             IgniteArgumentCheck.NotNull(val, "val");
@@ -223,7 +269,10 @@ namespace Apache.Ignite.Core.Impl.Memory
             }
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write double.
+        /// </summary>
+        /// <param name="val">Double value.</param>
         public virtual void WriteDouble(double val)
         {
             int curPos = EnsureWriteCapacityAndShift(Len8);
@@ -231,7 +280,10 @@ namespace Apache.Ignite.Core.Impl.Memory
             *((double*)(_data + curPos)) = val;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write double array.
+        /// </summary>
+        /// <param name="val">Double array.</param>
         public virtual void WriteDoubleArray(double[] val)
         {
             IgniteArgumentCheck.NotNull(val, "val");
@@ -242,7 +294,16 @@ namespace Apache.Ignite.Core.Impl.Memory
             }
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write string.
+        /// </summary>
+        /// <param name="chars">Characters.</param>
+        /// <param name="charCnt">Char count.</param>
+        /// <param name="byteCnt">Byte count.</param>
+        /// <param name="encoding">Encoding.</param>
+        /// <returns>
+        /// Amounts of bytes written.
+        /// </returns>
         [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods")]
         public int WriteString(char* chars, int charCnt, int byteCnt, Encoding encoding)
         {
@@ -254,7 +315,12 @@ namespace Apache.Ignite.Core.Impl.Memory
             return encoding.GetBytes(chars, charCnt, _data + curPos, byteCnt);
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write arbitrary data.
+        /// </summary>
+        /// <param name="src">Source array.</param>
+        /// <param name="off">Offset</param>
+        /// <param name="cnt">Count.</param>
         public void Write(byte[] src, int off, int cnt)
         {
             IgniteArgumentCheck.NotNull(src, "src");
@@ -265,25 +331,40 @@ namespace Apache.Ignite.Core.Impl.Memory
             }
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Write arbitrary data.
+        /// </summary>
+        /// <param name="src">Source.</param>
+        /// <param name="cnt">Count.</param>
         public void Write(byte* src, int cnt)
         {
             CopyFromAndShift(src, cnt);
         }
-        
+
         #endregion WRITE
-        
+
         #region READ
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Read byte.
+        /// </summary>
+        /// <returns>
+        /// Byte value.
+        /// </returns>
         public byte ReadByte()
         {
             int curPos = EnsureReadCapacityAndShift(Len1);
 
             return *(_data + curPos);
         }
-
-        /** <inheritdoc /> */
+        
+        /// <summary>
+        /// Read byte array.
+        /// </summary>
+        /// <param name="cnt">Count.</param>
+        /// <returns>
+        /// Byte array.
+        /// </returns>
         public byte[] ReadByteArray(int cnt)
         {
             int curPos = EnsureReadCapacityAndShift(cnt);
@@ -297,14 +378,25 @@ namespace Apache.Ignite.Core.Impl.Memory
 
             return res;
         }
-        
-        /** <inheritdoc /> */
+
+        /// <summary>
+        /// Read bool.
+        /// </summary>
+        /// <returns>
+        /// Bool value.
+        /// </returns>
         public bool ReadBool()
         {
             return ReadByte() == 1;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Read bool array.
+        /// </summary>
+        /// <param name="cnt">Count.</param>
+        /// <returns>
+        /// Bool array.
+        /// </returns>
         public bool[] ReadBoolArray(int cnt)
         {
             bool[] res = new bool[cnt];
@@ -317,7 +409,12 @@ namespace Apache.Ignite.Core.Impl.Memory
             return res;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Read short.
+        /// </summary>
+        /// <returns>
+        /// Short value.
+        /// </returns>
         public virtual short ReadShort()
         {
             int curPos = EnsureReadCapacityAndShift(Len2);
@@ -325,7 +422,13 @@ namespace Apache.Ignite.Core.Impl.Memory
             return *((short*)(_data + curPos));
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Read short array.
+        /// </summary>
+        /// <param name="cnt">Count.</param>
+        /// <returns>
+        /// Short array.
+        /// </returns>
         public virtual short[] ReadShortArray(int cnt)
         {
             short[] res = new short[cnt];
@@ -338,7 +441,12 @@ namespace Apache.Ignite.Core.Impl.Memory
             return res;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Read char.
+        /// </summary>
+        /// <returns>
+        /// Char value.
+        /// </returns>
         public virtual char ReadChar()
         {
             int curPos = EnsureReadCapacityAndShift(Len2);
@@ -346,7 +454,13 @@ namespace Apache.Ignite.Core.Impl.Memory
             return *((char*)(_data + curPos));
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Read char array.
+        /// </summary>
+        /// <param name="cnt">Count.</param>
+        /// <returns>
+        /// Char array.
+        /// </returns>
         public virtual char[] ReadCharArray(int cnt)
         {
             char[] res = new char[cnt];
@@ -359,15 +473,26 @@ namespace Apache.Ignite.Core.Impl.Memory
             return res;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Read int.
+        /// </summary>
+        /// <returns>
+        /// Int value.
+        /// </returns>
         public virtual int ReadInt()
         {
             int curPos = EnsureReadCapacityAndShift(Len4);
 
             return *((int*)(_data + curPos));
         }
-        
-        /** <inheritdoc /> */
+
+        /// <summary>
+        /// Read int array.
+        /// </summary>
+        /// <param name="cnt">Count.</param>
+        /// <returns>
+        /// Int array.
+        /// </returns>
         public virtual int[] ReadIntArray(int cnt)
         {
             int[] res = new int[cnt];
@@ -380,15 +505,26 @@ namespace Apache.Ignite.Core.Impl.Memory
             return res;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Read long.
+        /// </summary>
+        /// <returns>
+        /// Long value.
+        /// </returns>
         public virtual long ReadLong()
         {
             int curPos = EnsureReadCapacityAndShift(Len8);
 
             return *((long*)(_data + curPos));
         }
-        
-        /** <inheritdoc /> */
+
+        /// <summary>
+        /// Read long array.
+        /// </summary>
+        /// <param name="cnt">Count.</param>
+        /// <returns>
+        /// Long array.
+        /// </returns>
         public virtual long[] ReadLongArray(int cnt)
         {
             long[] res = new long[cnt];
@@ -401,7 +537,12 @@ namespace Apache.Ignite.Core.Impl.Memory
             return res;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Read float.
+        /// </summary>
+        /// <returns>
+        /// Float value.
+        /// </returns>
         public virtual float ReadFloat()
         {
             int curPos = EnsureReadCapacityAndShift(Len4);
@@ -409,7 +550,13 @@ namespace Apache.Ignite.Core.Impl.Memory
             return *((float*)(_data + curPos));
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Read float array.
+        /// </summary>
+        /// <param name="cnt">Count.</param>
+        /// <returns>
+        /// Float array.
+        /// </returns>
         public virtual float[] ReadFloatArray(int cnt)
         {
             float[] res = new float[cnt];
@@ -422,7 +569,12 @@ namespace Apache.Ignite.Core.Impl.Memory
             return res;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Read double.
+        /// </summary>
+        /// <returns>
+        /// Double value.
+        /// </returns>
         public virtual double ReadDouble()
         {
             int curPos = EnsureReadCapacityAndShift(Len8);
@@ -430,7 +582,13 @@ namespace Apache.Ignite.Core.Impl.Memory
             return *((double*)(_data + curPos));
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Read double array.
+        /// </summary>
+        /// <param name="cnt">Count.</param>
+        /// <returns>
+        /// Double array.
+        /// </returns>
         public virtual double[] ReadDoubleArray(int cnt)
         {
             double[] res = new double[cnt];
@@ -443,7 +601,12 @@ namespace Apache.Ignite.Core.Impl.Memory
             return res;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Read arbitrary data.
+        /// </summary>
+        /// <param name="dest">Destination array.</param>
+        /// <param name="off">Offset.</param>
+        /// <param name="cnt">Count.</param>
         public void Read(byte[] dest, int off, int cnt)
         {
             IgniteArgumentCheck.NotNull(dest, "dest");
@@ -454,7 +617,11 @@ namespace Apache.Ignite.Core.Impl.Memory
             }
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Read arbitrary data.
+        /// </summary>
+        /// <param name="dest">Destination.</param>
+        /// <param name="cnt">Count.</param>
         public void Read(byte* dest, int cnt)
         {
             CopyToAndShift(dest, cnt);
@@ -516,7 +683,19 @@ namespace Apache.Ignite.Core.Impl.Memory
             _pos = 0;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Seek to the given positoin.
+        /// </summary>
+        /// <param name="offset">Offset.</param>
+        /// <param name="origin">Seek origin.</param>
+        /// <returns>
+        /// Position.
+        /// </returns>
+        /// <exception cref="System.ArgumentException">
+        /// Unsupported seek origin:  + origin
+        /// or
+        /// Seek before origin:  + newPos
+        /// </exception>
         public int Seek(int offset, SeekOrigin origin)
         {
             int newPos;
@@ -651,26 +830,41 @@ namespace Apache.Ignite.Core.Impl.Memory
             return newCap;
         }
 
-        /** <inheritdoc /> */
+
+        /// <summary>
+        /// Position.
+        /// </summary>
         public int Position
         {
             get { return _pos; }
         }
 
-        /** <inheritdoc /> */
+
+        /// <summary>
+        /// Gets remaining bytes in the stream.
+        /// </summary>
+        /// <value>
+        /// Remaining bytes.
+        /// </value>
         public int Remaining
         {
             get { return _len - _pos; }
         }
 
-        /** <inheritdoc /> */
+
+        /// <summary>
+        /// Performs application-defined tasks associated with freeing, releasing, or resetting
unmanaged resources.
+        /// </summary>
         public void Dispose()
         {
             Dispose(true);
             GC.SuppressFinalize(this);
         }
 
-        /** <inheritdoc /> */
+
+        /// <summary>
+        /// Finalizes an instance of the <see cref="PlatformMemoryStream"/> class.
+        /// </summary>
         ~PlatformMemoryStream()
         {
             Dispose(false);
@@ -698,14 +892,24 @@ namespace Apache.Ignite.Core.Impl.Memory
         #endregion
 
         #region ARRAYS
-
-        /** <inheritdoc /> */
+        
+        /// <summary>
+        /// Gets underlying array, avoiding copying if possible.
+        /// </summary>
+        /// <returns>
+        /// Underlying array.
+        /// </returns>
         public byte[] GetArray()
         {
             return GetArrayCopy();
         }
-
-        /** <inheritdoc /> */
+        
+        /// <summary>
+        /// Gets underlying data in a new array.
+        /// </summary>
+        /// <returns>
+        /// New array with data.
+        /// </returns>
         public byte[] GetArrayCopy()
         {
             byte[] res = new byte[_mem.Length];
@@ -718,7 +922,13 @@ namespace Apache.Ignite.Core.Impl.Memory
             return res;
         }
 
-        /** <inheritdoc /> */
+        /// <summary>
+        /// Check whether array passed as argument is the same as the stream hosts.
+        /// </summary>
+        /// <param name="arr">Array.</param>
+        /// <returns>
+        ///   <c>True</c> if they are same.
+        /// </returns>
         public bool IsSameArray(byte[] arr)
         {
             return false;


Mime
View raw message