ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [24/38] ignite git commit: .NET: System type ctors cleanup - use appropriate reader type
Date Wed, 31 Aug 2016 06:33:14 GMT
.NET: System type ctors cleanup - use appropriate reader type


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

Branch: refs/heads/ignite-3443
Commit: db300bac24b68b3e268480636249efa5e4a11e65
Parents: c2f029f
Author: Pavel Tupitsyn <ptupitsyn@apache.org>
Authored: Mon Aug 29 19:47:23 2016 +0300
Committer: Pavel Tupitsyn <ptupitsyn@apache.org>
Committed: Mon Aug 29 19:47:23 2016 +0300

----------------------------------------------------------------------
 .../Impl/Binary/DateTimeHolder.cs               |  4 +--
 .../Impl/Binary/Marshaller.cs                   | 36 ++++++++++----------
 .../Impl/Binary/SerializableObjectHolder.cs     |  6 ++--
 .../Impl/Cache/CacheEntryFilterHolder.cs        | 10 +++---
 .../Impl/Cache/CacheEntryProcessorHolder.cs     |  8 ++---
 .../Continuous/ContinuousQueryFilterHolder.cs   |  8 ++---
 .../Impl/Compute/Closure/ComputeActionJob.cs    |  6 ++--
 .../Impl/Compute/Closure/ComputeFuncJob.cs      |  8 ++---
 .../Impl/Compute/Closure/ComputeOutFuncJob.cs   |  9 ++---
 .../Impl/Compute/ComputeFunc.cs                 |  9 +++--
 .../Impl/Compute/ComputeJob.cs                  | 10 +++---
 .../Impl/Compute/ComputeJobHolder.cs            |  8 ++---
 .../Impl/Compute/ComputeOutFunc.cs              |  8 ++---
 .../Impl/Datastream/StreamReceiverHolder.cs     |  2 +-
 .../Impl/Messaging/MessageListenerHolder.cs     |  8 ++---
 15 files changed, 60 insertions(+), 80 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/db300bac/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/DateTimeHolder.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/DateTimeHolder.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/DateTimeHolder.cs
index 473f6c4..b80348e 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/DateTimeHolder.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/DateTimeHolder.cs
@@ -42,11 +42,11 @@ namespace Apache.Ignite.Core.Impl.Binary
         /// Constructor.
         /// </summary>
         /// <param name="reader">The reader.</param>
-        public DateTimeHolder(IBinaryReader reader)
+        public DateTimeHolder(IBinaryRawReader reader)
         {
             Debug.Assert(reader != null);
 
-            _item = DateTime.FromBinary(reader.GetRawReader().ReadLong());
+            _item = DateTime.FromBinary(reader.ReadLong());
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/db300bac/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs
index 6e63e9a..035b356 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs
@@ -574,26 +574,26 @@ namespace Apache.Ignite.Core.Impl.Binary
         /// </summary>
         private void AddSystemTypes()
         {
-            AddSystemType(BinaryUtils.TypeNativeJobHolder, w => new ComputeJobHolder(w));
-            AddSystemType(BinaryUtils.TypeComputeJobWrapper, w => new ComputeJobWrapper(w));
-            AddSystemType(BinaryUtils.TypeIgniteProxy, w => new IgniteProxy());
-            AddSystemType(BinaryUtils.TypeComputeOutFuncJob, w => new ComputeOutFuncJob(w));
-            AddSystemType(BinaryUtils.TypeComputeOutFuncWrapper, w => new ComputeOutFuncWrapper(w));
-            AddSystemType(BinaryUtils.TypeComputeFuncWrapper, w => new ComputeFuncWrapper(w));
-            AddSystemType(BinaryUtils.TypeComputeFuncJob, w => new ComputeFuncJob(w));
-            AddSystemType(BinaryUtils.TypeComputeActionJob, w => new ComputeActionJob(w));
-            AddSystemType(BinaryUtils.TypeContinuousQueryRemoteFilterHolder, w => new
ContinuousQueryFilterHolder(w));
-            AddSystemType(BinaryUtils.TypeSerializableHolder, w => new SerializableObjectHolder(w),
+            AddSystemType(BinaryUtils.TypeNativeJobHolder, r => new ComputeJobHolder(r));
+            AddSystemType(BinaryUtils.TypeComputeJobWrapper, r => new ComputeJobWrapper(r));
+            AddSystemType(BinaryUtils.TypeIgniteProxy, r => new IgniteProxy());
+            AddSystemType(BinaryUtils.TypeComputeOutFuncJob, r => new ComputeOutFuncJob(r));
+            AddSystemType(BinaryUtils.TypeComputeOutFuncWrapper, r => new ComputeOutFuncWrapper(r));
+            AddSystemType(BinaryUtils.TypeComputeFuncWrapper, r => new ComputeFuncWrapper(r));
+            AddSystemType(BinaryUtils.TypeComputeFuncJob, r => new ComputeFuncJob(r));
+            AddSystemType(BinaryUtils.TypeComputeActionJob, r => new ComputeActionJob(r));
+            AddSystemType(BinaryUtils.TypeContinuousQueryRemoteFilterHolder, r => new
ContinuousQueryFilterHolder(r));
+            AddSystemType(BinaryUtils.TypeSerializableHolder, r => new SerializableObjectHolder(r),
                 serializer: new SerializableSerializer());
-            AddSystemType(BinaryUtils.TypeDateTimeHolder, w => new DateTimeHolder(w),
+            AddSystemType(BinaryUtils.TypeDateTimeHolder, r => new DateTimeHolder(r),
                 serializer: new DateTimeSerializer());
-            AddSystemType(BinaryUtils.TypeCacheEntryProcessorHolder, w => new CacheEntryProcessorHolder(w));
-            AddSystemType(BinaryUtils.TypeCacheEntryPredicateHolder, w => new CacheEntryFilterHolder(w));
-            AddSystemType(BinaryUtils.TypeMessageListenerHolder, w => new MessageListenerHolder(w));
-            AddSystemType(BinaryUtils.TypeStreamReceiverHolder, w => new StreamReceiverHolder(w));
-            AddSystemType(0, w => new AffinityKey(w), "affKey");
-            AddSystemType(BinaryUtils.TypePlatformJavaObjectFactoryProxy, w => new PlatformJavaObjectFactoryProxy());
-            AddSystemType(0, w => new ObjectInfoHolder(w));
+            AddSystemType(BinaryUtils.TypeCacheEntryProcessorHolder, r => new CacheEntryProcessorHolder(r));
+            AddSystemType(BinaryUtils.TypeCacheEntryPredicateHolder, r => new CacheEntryFilterHolder(r));
+            AddSystemType(BinaryUtils.TypeMessageListenerHolder, r => new MessageListenerHolder(r));
+            AddSystemType(BinaryUtils.TypeStreamReceiverHolder, r => new StreamReceiverHolder(r));
+            AddSystemType(0, r => new AffinityKey(r), "affKey");
+            AddSystemType(BinaryUtils.TypePlatformJavaObjectFactoryProxy, r => new PlatformJavaObjectFactoryProxy());
+            AddSystemType(0, r => new ObjectInfoHolder(r));
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/db300bac/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/SerializableObjectHolder.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/SerializableObjectHolder.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/SerializableObjectHolder.cs
index 08b44df..99c8f49 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/SerializableObjectHolder.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/SerializableObjectHolder.cs
@@ -67,13 +67,11 @@ namespace Apache.Ignite.Core.Impl.Binary
         /// Initializes a new instance of the <see cref="SerializableObjectHolder"/>
class.
         /// </summary>
         /// <param name="reader">The reader.</param>
-        public SerializableObjectHolder(IBinaryReader reader)
+        public SerializableObjectHolder(BinaryReader reader)
         {
             Debug.Assert(reader != null);
 
-            var reader0 = (BinaryReader) reader.GetRawReader();
-
-            using (var streamAdapter = new BinaryStreamAdapter(reader0.Stream))
+            using (var streamAdapter = new BinaryStreamAdapter(reader.Stream))
             {
                 _item = new BinaryFormatter().Deserialize(streamAdapter, null);
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/db300bac/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryFilterHolder.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryFilterHolder.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryFilterHolder.cs
index 4487c59..90db02c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryFilterHolder.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryFilterHolder.cs
@@ -88,15 +88,13 @@ namespace Apache.Ignite.Core.Impl.Cache
         /// Initializes a new instance of the <see cref="CacheEntryFilterHolder"/>
class.
         /// </summary>
         /// <param name="reader">The reader.</param>
-        public CacheEntryFilterHolder(IBinaryReader reader)
+        public CacheEntryFilterHolder(BinaryReader reader)
         {
-            var reader0 = (BinaryReader)reader.GetRawReader();
+            _pred = reader.ReadObject<object>();
 
-            _pred = reader0.ReadObject<object>();
+            _keepBinary = reader.ReadBoolean();
 
-            _keepBinary = reader0.ReadBoolean();
-
-            _marsh = reader0.Marshaller;
+            _marsh = reader.Marshaller;
 
             _invoker = GetInvoker(_pred);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/db300bac/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryProcessorHolder.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryProcessorHolder.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryProcessorHolder.cs
index a0f8f3a..9fc7c7d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryProcessorHolder.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheEntryProcessorHolder.cs
@@ -113,12 +113,10 @@ namespace Apache.Ignite.Core.Impl.Cache
         /// Initializes a new instance of the <see cref="CacheEntryProcessorHolder"/>
class.
         /// </summary>
         /// <param name="reader">The reader.</param>
-        public CacheEntryProcessorHolder(IBinaryReader reader)
+        public CacheEntryProcessorHolder(IBinaryRawReader reader)
         {
-            var reader0 = (BinaryReader) reader.GetRawReader();
-
-            _proc = reader0.ReadObject<object>();
-            _arg = reader0.ReadObject<object>();
+            _proc = reader.ReadObject<object>();
+            _arg = reader.ReadObject<object>();
 
             _processFunc = GetProcessFunc(_proc);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/db300bac/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryFilterHolder.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryFilterHolder.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryFilterHolder.cs
index c2e7762..6eebbbe 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryFilterHolder.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryFilterHolder.cs
@@ -75,12 +75,10 @@ namespace Apache.Ignite.Core.Impl.Cache.Query.Continuous
         /// Initializes a new instance of the <see cref="ContinuousQueryFilterHolder"/>
class.
         /// </summary>
         /// <param name="reader">The reader.</param>
-        public ContinuousQueryFilterHolder(IBinaryReader reader)
+        public ContinuousQueryFilterHolder(IBinaryRawReader reader)
         {
-            var rawReader = (BinaryReader) reader.GetRawReader();
-
-            _filter = rawReader.ReadObject<object>();
-            _keepBinary = rawReader.ReadBoolean();
+            _filter = reader.ReadObject<object>();
+            _keepBinary = reader.ReadBoolean();
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/db300bac/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeActionJob.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeActionJob.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeActionJob.cs
index d7c4311..55332d5 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeActionJob.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeActionJob.cs
@@ -72,11 +72,9 @@ namespace Apache.Ignite.Core.Impl.Compute.Closure
         /// Initializes a new instance of the <see cref="ComputeActionJob"/> class.
         /// </summary>
         /// <param name="reader">The reader.</param>
-        public ComputeActionJob(IBinaryReader reader)
+        public ComputeActionJob(IBinaryRawReader reader)
         {
-            var reader0 = (BinaryReader)reader.GetRawReader();
-
-            _action = reader0.ReadObject<IComputeAction>();
+            _action = reader.ReadObject<IComputeAction>();
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/db300bac/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeFuncJob.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeFuncJob.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeFuncJob.cs
index 8f76fcf..0cd8df2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeFuncJob.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeFuncJob.cs
@@ -75,12 +75,10 @@ namespace Apache.Ignite.Core.Impl.Compute.Closure
         /// Initializes a new instance of the <see cref="ComputeFuncJob"/> class.
         /// </summary>
         /// <param name="reader">The reader.</param>
-        public ComputeFuncJob(IBinaryReader reader)
+        public ComputeFuncJob(IBinaryRawReader reader)
         {
-            var reader0 = (BinaryReader) reader.GetRawReader();
-
-            _clo = reader0.ReadObject<IComputeFunc>();
-            _arg = reader0.ReadObject<object>();
+            _clo = reader.ReadObject<IComputeFunc>();
+            _arg = reader.ReadObject<object>();
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/db300bac/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeOutFuncJob.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeOutFuncJob.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeOutFuncJob.cs
index c99d821..abdf448 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeOutFuncJob.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/Closure/ComputeOutFuncJob.cs
@@ -65,11 +65,12 @@ namespace Apache.Ignite.Core.Impl.Compute.Closure
             writer0.WithDetach(w => w.WriteObject(_clo));
         }
 
-        public ComputeOutFuncJob(IBinaryReader reader)
+        /// <summary>
+        /// Initializes a new instance of the <see cref="ComputeOutFuncJob" /> class.
+        /// </summary>
+        public ComputeOutFuncJob(IBinaryRawReader reader)
         {
-            var reader0 = (BinaryReader) reader.GetRawReader();
-
-            _clo = reader0.ReadObject<IComputeOutFunc>();
+            _clo = reader.ReadObject<IComputeOutFunc>();
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/db300bac/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeFunc.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeFunc.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeFunc.cs
index 454f7bb..db22c94 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeFunc.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeFunc.cs
@@ -66,7 +66,7 @@ namespace Apache.Ignite.Core.Impl.Compute
             }
             catch (TargetInvocationException ex)
             {
-                throw ex.InnerException;
+                throw ex.InnerException ?? ex;
             }
         }
 
@@ -82,11 +82,9 @@ namespace Apache.Ignite.Core.Impl.Compute
         /// Initializes a new instance of the <see cref="ComputeFuncWrapper"/> class.
         /// </summary>
         /// <param name="reader">The reader.</param>
-        public ComputeFuncWrapper(IBinaryReader reader)
+        public ComputeFuncWrapper(IBinaryRawReader reader)
         {
-            var reader0 = (BinaryReader)reader.GetRawReader();
-
-            _func = reader0.ReadObject<object>();
+            _func = reader.ReadObject<object>();
 
             _invoker = DelegateTypeDescriptor.GetComputeFunc(_func.GetType());
         }
@@ -95,6 +93,7 @@ namespace Apache.Ignite.Core.Impl.Compute
         /// Injects the Ignite instance.
         /// </summary>
         [InstanceResource]
+        // ReSharper disable once UnusedMember.Global (used by injector)
         public void InjectIgnite(IIgnite ignite)
         {
             // Propagate injection

http://git-wip-us.apache.org/repos/asf/ignite/blob/db300bac/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJob.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJob.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJob.cs
index 526c445..ad29b03 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJob.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJob.cs
@@ -52,11 +52,9 @@ namespace Apache.Ignite.Core.Impl.Compute
         /// Initializes a new instance of the <see cref="ComputeJobWrapper"/> class.
         /// </summary>
         /// <param name="reader">The reader.</param>
-        public ComputeJobWrapper(IBinaryReader reader)
+        public ComputeJobWrapper(IBinaryRawReader reader)
         {
-            var reader0 = (BinaryReader)reader.GetRawReader();
-
-            _job = reader0.ReadObject<object>();
+            _job = reader.ReadObject<object>();
 
             DelegateTypeDescriptor.GetComputeJob(_job.GetType(), out _execute, out _cancel);
         }
@@ -82,7 +80,7 @@ namespace Apache.Ignite.Core.Impl.Compute
             }
             catch (TargetInvocationException ex)
             {
-                throw ex.InnerException;
+                throw ex.InnerException ?? ex;
             }
         }
 
@@ -95,7 +93,7 @@ namespace Apache.Ignite.Core.Impl.Compute
             }
             catch (TargetInvocationException ex)
             {
-                throw ex.InnerException;
+                throw ex.InnerException ?? ex;
             }
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/db300bac/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJobHolder.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJobHolder.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJobHolder.cs
index 0d93010..6389730 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJobHolder.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJobHolder.cs
@@ -47,15 +47,13 @@ namespace Apache.Ignite.Core.Impl.Compute
         /// Default ctor for marshalling.
         /// </summary>
         /// <param name="reader"></param>
-        public ComputeJobHolder(IBinaryReader reader)
+        public ComputeJobHolder(BinaryReader reader)
         {
             Debug.Assert(reader != null);
 
-            var reader0 = (BinaryReader) reader.GetRawReader();
+            _ignite = reader.Marshaller.Ignite;
 
-            _ignite = reader0.Marshaller.Ignite;
-
-            _job = reader0.ReadObject<IComputeJob>();
+            _job = reader.ReadObject<IComputeJob>();
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/db300bac/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeOutFunc.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeOutFunc.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeOutFunc.cs
index 1867f8c..f581c3f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeOutFunc.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeOutFunc.cs
@@ -70,7 +70,7 @@ namespace Apache.Ignite.Core.Impl.Compute
             }
             catch (TargetInvocationException ex)
             {
-                throw ex.InnerException;
+                throw ex.InnerException ?? ex;
             }
         }
 
@@ -86,11 +86,9 @@ namespace Apache.Ignite.Core.Impl.Compute
         /// Initializes a new instance of the <see cref="ComputeOutFuncWrapper"/> class.
         /// </summary>
         /// <param name="reader">The reader.</param>
-        public ComputeOutFuncWrapper(IBinaryReader reader)
+        public ComputeOutFuncWrapper(IBinaryRawReader reader)
         {
-            var reader0 = (BinaryReader)reader.GetRawReader();
-
-            _func = reader0.ReadObject<object>();
+            _func = reader.ReadObject<object>();
 
             _invoker = DelegateTypeDescriptor.GetComputeOutFunc(_func.GetType());
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/db300bac/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/StreamReceiverHolder.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/StreamReceiverHolder.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/StreamReceiverHolder.cs
index 90ade5a..953ddb6 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/StreamReceiverHolder.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Datastream/StreamReceiverHolder.cs
@@ -50,7 +50,7 @@ namespace Apache.Ignite.Core.Impl.Datastream
         /// Initializes a new instance of the <see cref="StreamReceiverHolder"/> class.
         /// </summary>
         /// <param name="reader">The reader.</param>
-        public StreamReceiverHolder(BinaryReader reader)
+        public StreamReceiverHolder(IBinaryRawReader reader)
         {
             var rcvType = reader.ReadByte();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/db300bac/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Messaging/MessageListenerHolder.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Messaging/MessageListenerHolder.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Messaging/MessageListenerHolder.cs
index 1a2c18a..8e794d1 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Messaging/MessageListenerHolder.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Messaging/MessageListenerHolder.cs
@@ -155,15 +155,13 @@ namespace Apache.Ignite.Core.Impl.Messaging
         /// Initializes a new instance of the <see cref="MessageListenerHolder"/> class.
         /// </summary>
         /// <param name="reader">The reader.</param>
-        public MessageListenerHolder(IBinaryReader reader)
+        public MessageListenerHolder(BinaryReader reader)
         {
-            var reader0 = (BinaryReader)reader.GetRawReader();
-
-            _filter = reader0.ReadObject<object>();
+            _filter = reader.ReadObject<object>();
 
             _invoker = GetInvoker(_filter);
 
-            _ignite = reader0.Marshaller.Ignite;
+            _ignite = reader.Marshaller.Ignite;
 
             ResourceProcessor.Inject(_filter, _ignite);
         }


Mime
View raw message