Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 33894200C6B for ; Tue, 18 Apr 2017 07:39:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 31FE9160BB3; Tue, 18 Apr 2017 05:39:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D45B8160BAB for ; Tue, 18 Apr 2017 07:39:04 +0200 (CEST) Received: (qmail 54789 invoked by uid 500); 18 Apr 2017 05:39:04 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 54743 invoked by uid 99); 18 Apr 2017 05:39:03 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Apr 2017 05:39:03 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C094EDFC31; Tue, 18 Apr 2017 05:39:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.apache.org Date: Tue, 18 Apr 2017 05:39:03 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [01/46] ignite git commit: IGNITE-3689 .NET: Remove IgniteProxy archived-at: Tue, 18 Apr 2017 05:39:06 -0000 Repository: ignite Updated Branches: refs/heads/ignite-1561-1 84df73e30 -> 84d4dec1f IGNITE-3689 .NET: Remove IgniteProxy This closes #1797 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d5e66294 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d5e66294 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d5e66294 Branch: refs/heads/ignite-1561-1 Commit: d5e662940c4d5b4b3ae219e9d4d21b86fc7458c6 Parents: ded599a Author: Pavel Tupitsyn Authored: Mon Apr 17 11:40:49 2017 +0300 Committer: Pavel Tupitsyn Committed: Mon Apr 17 11:40:49 2017 +0300 ---------------------------------------------------------------------- .../Apache.Ignite.Core.Tests/ExecutableTest.cs | 2 +- .../Apache.Ignite.Core.Tests/LifecycleTest.cs | 7 - .../Log/CustomLoggerTest.cs | 4 +- .../Apache.Ignite.Core.csproj | 1 - .../dotnet/Apache.Ignite.Core/Ignition.cs | 2 +- .../Impl/Binary/BinarySystemHandlers.cs | 10 + .../Impl/Binary/Marshaller.cs | 1 - .../Impl/Compute/ComputeFunc.cs | 2 +- .../Impl/Compute/ComputeJob.cs | 2 +- .../Impl/Compute/ComputeOutFunc.cs | 2 +- .../dotnet/Apache.Ignite.Core/Impl/Ignite.cs | 14 - .../Apache.Ignite.Core/Impl/IgniteProxy.cs | 464 ------------------- .../Impl/Resource/ResourceProcessor.cs | 10 - .../Impl/Resource/ResourceTypeDescriptor.cs | 12 +- 14 files changed, 18 insertions(+), 515 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/d5e66294/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs index ae945e9..8fcd99b 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs @@ -440,7 +440,7 @@ namespace Apache.Ignite.Core.Tests public RemoteConfiguration Invoke() { - var grid0 = ((IgniteProxy) _grid).Target; + var grid0 = (Ignite) _grid; var cfg = grid0.Configuration; http://git-wip-us.apache.org/repos/asf/ignite/blob/d5e66294/modules/platforms/dotnet/Apache.Ignite.Core.Tests/LifecycleTest.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/LifecycleTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/LifecycleTest.cs index 7c9c10d..2180a74 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/LifecycleTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/LifecycleTest.cs @@ -21,7 +21,6 @@ namespace Apache.Ignite.Core.Tests using System.Collections; using System.Collections.Generic; using Apache.Ignite.Core.Common; - using Apache.Ignite.Core.Impl; using Apache.Ignite.Core.Lifecycle; using Apache.Ignite.Core.Resource; using NUnit.Framework; @@ -214,12 +213,6 @@ namespace Apache.Ignite.Core.Tests /// Expected property 2. private static void CheckEvent(Event evt, IIgnite expGrid1, IIgnite expGrid2, int expProp1, string expProp2) { - if (evt.Grid1 != null && evt.Grid1 is IgniteProxy) - evt.Grid1 = (evt.Grid1 as IgniteProxy).Target; - - if (evt.Grid2 != null && evt.Grid2 is IgniteProxy) - evt.Grid2 = (evt.Grid2 as IgniteProxy).Target; - Assert.AreEqual(expGrid1, evt.Grid1); Assert.AreEqual(expGrid2, evt.Grid2); Assert.AreEqual(expProp1, evt.Prop1); http://git-wip-us.apache.org/repos/asf/ignite/blob/d5e66294/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Log/CustomLoggerTest.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Log/CustomLoggerTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Log/CustomLoggerTest.cs index f8f7f7a..567ca2f 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Log/CustomLoggerTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Log/CustomLoggerTest.cs @@ -25,7 +25,6 @@ namespace Apache.Ignite.Core.Tests.Log using Apache.Ignite.Core.Common; using Apache.Ignite.Core.Communication.Tcp; using Apache.Ignite.Core.Compute; - using Apache.Ignite.Core.Impl; using Apache.Ignite.Core.Lifecycle; using Apache.Ignite.Core.Log; using Apache.Ignite.Core.Resource; @@ -58,7 +57,7 @@ namespace Apache.Ignite.Core.Tests.Log using (var ignite = Ignition.Start(cfg)) { // Check injection - Assert.AreEqual(((Ignite) ignite).Proxy, ((TestLogger) cfg.Logger).Ignite); + Assert.AreEqual(ignite, ((TestLogger) cfg.Logger).Ignite); // Check initial message Assert.IsTrue(TestLogger.Entries[0].Message.StartsWith("Starting Ignite.NET")); @@ -137,6 +136,7 @@ namespace Apache.Ignite.Core.Tests.Log TestUtils.WaitForCondition(() => TestLogger.Entries.Any(x => x.Exception != null), 3000); var errFromJava = TestLogger.Entries.Single(x => x.Exception != null); + Assert.IsNotNull(errFromJava.Exception.InnerException); Assert.AreEqual("Error in func.", ((ArithmeticException) errFromJava.Exception.InnerException).Message); } } http://git-wip-us.apache.org/repos/asf/ignite/blob/d5e66294/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj index a1307e7..16e2552 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj @@ -359,7 +359,6 @@ - http://git-wip-us.apache.org/repos/asf/ignite/blob/d5e66294/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs index 6bc3b34..d2be92a 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs @@ -782,7 +782,7 @@ namespace Apache.Ignite.Core public void OnLifecycleEvent(LifecycleEventType evt) { if (evt == LifecycleEventType.BeforeNodeStop && _ignite != null) - ((IgniteProxy) _ignite).Target.BeforeNodeStop(); + ((Ignite) _ignite).BeforeNodeStop(); } } } http://git-wip-us.apache.org/repos/asf/ignite/blob/d5e66294/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs index 60bbb46..a30b981 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinarySystemHandlers.cs @@ -197,6 +197,8 @@ namespace Apache.Ignite.Core.Impl.Binary return WriteBinaryEnum; if (type.IsEnum) return WriteEnum; + if (type == typeof(Ignite)) + return WriteIgnite; // All types below can be written as handles. supportsHandles = true; @@ -638,6 +640,14 @@ namespace Apache.Ignite.Core.Impl.Binary { return BinaryUtils.ReadDictionary(ctx, null); } + + /// + /// Write Ignite. + /// + private static void WriteIgnite(BinaryWriter ctx, object obj) + { + ctx.Stream.WriteByte(BinaryUtils.HdrNull); + } /** * Read delegate. http://git-wip-us.apache.org/repos/asf/ignite/blob/d5e66294/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 f47cbe2..b60ced9 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Marshaller.cs @@ -703,7 +703,6 @@ namespace Apache.Ignite.Core.Impl.Binary { 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)); http://git-wip-us.apache.org/repos/asf/ignite/blob/d5e66294/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 62261c9..951e179 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeFunc.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeFunc.cs @@ -100,7 +100,7 @@ namespace Apache.Ignite.Core.Impl.Compute public void InjectIgnite(IIgnite ignite) { // Propagate injection - ResourceProcessor.Inject(_func, (IgniteProxy) ignite); + ResourceProcessor.Inject(_func, (Ignite) ignite); } } http://git-wip-us.apache.org/repos/asf/ignite/blob/d5e66294/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 d2beb2c..4c0b536 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJob.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJob.cs @@ -118,7 +118,7 @@ namespace Apache.Ignite.Core.Impl.Compute public void InjectIgnite(IIgnite ignite) { // Propagate injection - ResourceProcessor.Inject(Job, (IgniteProxy)ignite); + ResourceProcessor.Inject(Job, (Ignite)ignite); } /// http://git-wip-us.apache.org/repos/asf/ignite/blob/d5e66294/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 f973ae5..71934d4 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeOutFunc.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeOutFunc.cs @@ -103,7 +103,7 @@ namespace Apache.Ignite.Core.Impl.Compute public void InjectIgnite(IIgnite ignite) { // Propagate injection - ResourceProcessor.Inject(_func, (IgniteProxy)ignite); + ResourceProcessor.Inject(_func, (Ignite)ignite); } } http://git-wip-us.apache.org/repos/asf/ignite/blob/d5e66294/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Ignite.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Ignite.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Ignite.cs index 35950b6..9cd1aa5 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Ignite.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Ignite.cs @@ -75,9 +75,6 @@ namespace Apache.Ignite.Core.Impl /** Binary processor. */ private readonly BinaryProcessor _binaryProc; - /** Cached proxy. */ - private readonly IgniteProxy _proxy; - /** Lifecycle handlers. */ private readonly IList _lifecycleHandlers; @@ -134,8 +131,6 @@ namespace Apache.Ignite.Core.Impl _binaryProc = new BinaryProcessor(UU.ProcessorBinaryProcessor(proc), marsh); - _proxy = new IgniteProxy(this); - cbs.Initialize(this); // Grid is not completely started here, can't initialize interop transactions right away. @@ -177,15 +172,6 @@ namespace Apache.Ignite.Core.Impl lifecycleBean.OnStart(this); } - /// - /// Gets Ignite proxy. - /// - /// Proxy. - public IgniteProxy Proxy - { - get { return _proxy; } - } - /** */ public string Name { http://git-wip-us.apache.org/repos/asf/ignite/blob/d5e66294/modules/platforms/dotnet/Apache.Ignite.Core/Impl/IgniteProxy.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/IgniteProxy.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/IgniteProxy.cs deleted file mode 100644 index 5e17853..0000000 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/IgniteProxy.cs +++ /dev/null @@ -1,464 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace Apache.Ignite.Core.Impl -{ - using System; - using System.Collections.Generic; - using System.Diagnostics.CodeAnalysis; - using System.Threading.Tasks; - using Apache.Ignite.Core.Binary; - using Apache.Ignite.Core.Cache; - using Apache.Ignite.Core.Cache.Configuration; - using Apache.Ignite.Core.Cluster; - using Apache.Ignite.Core.Compute; - using Apache.Ignite.Core.Datastream; - using Apache.Ignite.Core.DataStructures; - using Apache.Ignite.Core.Events; - using Apache.Ignite.Core.Impl.Binary; - using Apache.Ignite.Core.Log; - using Apache.Ignite.Core.Lifecycle; - using Apache.Ignite.Core.Messaging; - using Apache.Ignite.Core.Services; - using Apache.Ignite.Core.Transactions; - - /// - /// Grid proxy with fake serialization. - /// - [Serializable] - [ExcludeFromCodeCoverage] - internal class IgniteProxy : IIgnite, IBinaryWriteAware, ICluster - { - /** */ - [NonSerialized] - private readonly Ignite _ignite; - - /// - /// Default ctor for marshalling. - /// - public IgniteProxy() - { - // No-op. - } - - /// - /// Constructor. - /// - /// Grid. - public IgniteProxy(Ignite ignite) - { - _ignite = ignite; - } - - /** */ - public string Name - { - get { return _ignite.Name; } - } - - /** */ - - public ICluster GetCluster() - { - return this; - } - - /** */ - public IIgnite Ignite - { - get { return this; } - } - - /** */ - public IClusterGroup ForLocal() - { - return _ignite.GetCluster().ForLocal(); - } - - /** */ - public ICompute GetCompute() - { - return _ignite.GetCompute(); - } - - /** */ - public IClusterGroup ForNodes(IEnumerable nodes) - { - return _ignite.GetCluster().ForNodes(nodes); - } - - /** */ - public IClusterGroup ForNodes(params IClusterNode[] nodes) - { - return _ignite.GetCluster().ForNodes(nodes); - } - - /** */ - public IClusterGroup ForNodeIds(IEnumerable ids) - { - return _ignite.GetCluster().ForNodeIds(ids); - } - - /** */ - public IClusterGroup ForNodeIds(ICollection ids) - { - return _ignite.GetCluster().ForNodeIds(ids); - } - - /** */ - public IClusterGroup ForNodeIds(params Guid[] ids) - { - return _ignite.GetCluster().ForNodeIds(ids); - } - - /** */ - public IClusterGroup ForPredicate(Func p) - { - return _ignite.GetCluster().ForPredicate(p); - } - - /** */ - public IClusterGroup ForAttribute(string name, string val) - { - return _ignite.GetCluster().ForAttribute(name, val); - } - - /** */ - public IClusterGroup ForCacheNodes(string name) - { - return _ignite.GetCluster().ForCacheNodes(name); - } - - /** */ - public IClusterGroup ForDataNodes(string name) - { - return _ignite.GetCluster().ForDataNodes(name); - } - - /** */ - public IClusterGroup ForClientNodes(string name) - { - return _ignite.GetCluster().ForClientNodes(name); - } - - /** */ - public IClusterGroup ForRemotes() - { - return _ignite.GetCluster().ForRemotes(); - } - - /** */ - public IClusterGroup ForDaemons() - { - return _ignite.GetCluster().ForDaemons(); - } - - /** */ - public IClusterGroup ForHost(IClusterNode node) - { - return _ignite.GetCluster().ForHost(node); - } - - /** */ - public IClusterGroup ForRandom() - { - return _ignite.GetCluster().ForRandom(); - } - - /** */ - public IClusterGroup ForOldest() - { - return _ignite.GetCluster().ForOldest(); - } - - /** */ - public IClusterGroup ForYoungest() - { - return _ignite.GetCluster().ForYoungest(); - } - - /** */ - public IClusterGroup ForDotNet() - { - return _ignite.GetCluster().ForDotNet(); - } - - /** */ - public IClusterGroup ForServers() - { - return _ignite.GetCluster().ForServers(); - } - - /** */ - public ICollection GetNodes() - { - return _ignite.GetCluster().GetNodes(); - } - - /** */ - public IClusterNode GetNode(Guid id) - { - return _ignite.GetCluster().GetNode(id); - } - - /** */ - public IClusterNode GetNode() - { - return _ignite.GetCluster().GetNode(); - } - - /** */ - public IClusterMetrics GetMetrics() - { - return _ignite.GetCluster().GetMetrics(); - } - - /** */ - [SuppressMessage("Microsoft.Usage", "CA1816:CallGCSuppressFinalizeCorrectly", - Justification = "There is no finalizer.")] - public void Dispose() - { - _ignite.Dispose(); - } - - /** */ - public ICache GetCache(string name) - { - return _ignite.GetCache(name); - } - - /** */ - public ICache GetOrCreateCache(string name) - { - return _ignite.GetOrCreateCache(name); - } - - /** */ - public ICache GetOrCreateCache(CacheConfiguration configuration) - { - return _ignite.GetOrCreateCache(configuration); - } - - /** */ - public ICache GetOrCreateCache(CacheConfiguration configuration, NearCacheConfiguration nearConfiguration) - { - return _ignite.GetOrCreateCache(configuration, nearConfiguration); - } - - /** */ - public ICache CreateCache(string name) - { - return _ignite.CreateCache(name); - } - - /** */ - public ICache CreateCache(CacheConfiguration configuration) - { - return _ignite.CreateCache(configuration); - } - - /** */ - public ICache CreateCache(CacheConfiguration configuration, NearCacheConfiguration nearConfiguration) - { - return _ignite.CreateCache(configuration, nearConfiguration); - } - - /** */ - public void DestroyCache(string name) - { - _ignite.DestroyCache(name); - } - - /** */ - public IClusterNode GetLocalNode() - { - return _ignite.GetCluster().GetLocalNode(); - } - - /** */ - public bool PingNode(Guid nodeId) - { - return _ignite.GetCluster().PingNode(nodeId); - } - - /** */ - public long TopologyVersion - { - get { return _ignite.GetCluster().TopologyVersion; } - } - - /** */ - public ICollection GetTopology(long ver) - { - return _ignite.GetCluster().GetTopology(ver); - } - - /** */ - public void ResetMetrics() - { - _ignite.GetCluster().ResetMetrics(); - } - - /** */ - public Task ClientReconnectTask - { - get { return _ignite.GetCluster().ClientReconnectTask; } - } - - /** */ - public IDataStreamer GetDataStreamer(string cacheName) - { - return _ignite.GetDataStreamer(cacheName); - } - - /** */ - public IBinary GetBinary() - { - return _ignite.GetBinary(); - } - - /** */ - public ICacheAffinity GetAffinity(string name) - { - return _ignite.GetAffinity(name); - } - - /** */ - - public ITransactions GetTransactions() - { - return _ignite.GetTransactions(); - } - - /** */ - public IMessaging GetMessaging() - { - return _ignite.GetMessaging(); - } - - /** */ - public IEvents GetEvents() - { - return _ignite.GetEvents(); - } - - /** */ - public IServices GetServices() - { - return _ignite.GetServices(); - } - - /** */ - public IAtomicLong GetAtomicLong(string name, long initialValue, bool create) - { - return _ignite.GetAtomicLong(name, initialValue, create); - } - - /** */ - public IgniteConfiguration GetConfiguration() - { - return _ignite.GetConfiguration(); - } - - /** */ - public ICache CreateNearCache(string name, NearCacheConfiguration configuration) - { - return _ignite.CreateNearCache(name, configuration); - } - - /** */ - public ICache GetOrCreateNearCache(string name, NearCacheConfiguration configuration) - { - return _ignite.GetOrCreateNearCache(name, configuration); - } - - /** */ - public ICollection GetCacheNames() - { - return _ignite.GetCacheNames(); - } - - /** */ - public ILogger Logger - { - get { return _ignite.Logger; } - } - - /** */ - public event EventHandler Stopping - { - add { _ignite.Stopping += value; } - remove { _ignite.Stopping -= value; } - } - - /** */ - public event EventHandler Stopped - { - add { _ignite.Stopped += value; } - remove { _ignite.Stopped -= value; } - } - - /** */ - public event EventHandler ClientDisconnected - { - add { _ignite.ClientDisconnected += value; } - remove { _ignite.ClientDisconnected -= value; } - } - - /** */ - public event EventHandler ClientReconnected - { - add { _ignite.ClientReconnected += value; } - remove { _ignite.ClientReconnected -= value; } - } - - /** */ - public T GetPlugin(string name) where T : class - { - return _ignite.GetPlugin(name); - } - - /** */ - public IAtomicSequence GetAtomicSequence(string name, long initialValue, bool create) - { - return _ignite.GetAtomicSequence(name, initialValue, create); - } - - /** */ - public IAtomicReference GetAtomicReference(string name, T initialValue, bool create) - { - return _ignite.GetAtomicReference(name, initialValue, create); - } - - /** */ - public void WriteBinary(IBinaryWriter writer) - { - // No-op. - } - - /// - /// Target grid. - /// - internal Ignite Target - { - get - { - return _ignite; - } - } - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/d5e66294/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceProcessor.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceProcessor.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceProcessor.cs index 99023b7..fc677b0 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceProcessor.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceProcessor.cs @@ -73,16 +73,6 @@ namespace Apache.Ignite.Core.Impl.Resource /// Grid. public static void Inject(object target, Ignite grid) { - Inject(target, grid.Proxy); - } - - /// - /// Inject resources to the given target. - /// - /// Target object. - /// Grid. - public static void Inject(object target, IgniteProxy grid) - { if (target != null) { var desc = Descriptor(target.GetType()); http://git-wip-us.apache.org/repos/asf/ignite/blob/d5e66294/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceTypeDescriptor.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceTypeDescriptor.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceTypeDescriptor.cs index 6d2b7b0..3a3f629 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceTypeDescriptor.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Resource/ResourceTypeDescriptor.cs @@ -89,17 +89,7 @@ namespace Apache.Ignite.Core.Impl.Resource /// Grid. public void InjectIgnite(object target, Ignite ignite) { - InjectIgnite(target, ignite.Proxy); - } - - /// - /// Inject resources to the given object. - /// - /// Target. - /// Grid proxy. - public void InjectIgnite(object target, IgniteProxy igniteProxy) - { - Inject0(target, igniteProxy, _igniteInjectors); + Inject0(target, ignite, _igniteInjectors); } ///