Refactor public API

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

Branch: refs/heads/ignite-2977
Commit: 2f5b50272908e5c01ec24c5a00a12b9e9c7a05c2
Parents: 282af98
Author: Pavel Tupitsyn <[email protected]>
Authored: Wed Apr 13 12:48:15 2016 +0300
Committer: Pavel Tupitsyn <[email protected]>
Committed: Wed Apr 13 12:48:15 2016 +0300

----------------------------------------------------------------------
 .../Continuous/ContinuousQueryJavaFilterTest.cs |  2 +-
 .../Apache.Ignite.Core/Interop/JavaObject.cs    | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/2f5b5027/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
----------------------------------------------------------------------
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
index 580d19f..5b6439a 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryJavaFilterTest.cs
@@ -97,7 +97,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
         {
             var javaObj = new 
JavaObject("org.apache.ignite.platform.PlatformCacheEntryEventFilter")
             {
-                Properties = new Dictionary<string, object> {{"startsWith", 
"valid"}}
+                Properties = {{"startsWith", "valid"}}
             };
 
             var filter = javaObj.ToCacheEntryEventFilter<int, string>();

http://git-wip-us.apache.org/repos/asf/ignite/blob/2f5b5027/modules/platforms/dotnet/Apache.Ignite.Core/Interop/JavaObject.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Interop/JavaObject.cs 
b/modules/platforms/dotnet/Apache.Ignite.Core/Interop/JavaObject.cs
index 97f536a..d45b98b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Interop/JavaObject.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Interop/JavaObject.cs
@@ -37,7 +37,10 @@ namespace Apache.Ignite.Core.Interop
     public class JavaObject
     {
         /** Java class name. */
-        private string _className;
+        private readonly string _className;
+
+        /** Properties. */
+        private readonly IDictionary<string, object> _properties = new 
Dictionary<string, object>();
 
         /// <summary>
         /// Initializes a new instance of the <see cref="JavaObject"/> class.
@@ -47,7 +50,7 @@ namespace Apache.Ignite.Core.Interop
         {
             IgniteArgumentCheck.NotNullOrEmpty(className, "className");
 
-            ClassName = className;
+            _className = className;
         }
 
         /// <summary>
@@ -57,7 +60,7 @@ namespace Apache.Ignite.Core.Interop
         /// <param name="properties">The properties to set on the Java 
object.</param>
         public JavaObject(string className, IDictionary<string, object> 
properties) : this(className)
         {
-            Properties = properties;
+            _properties = properties;
         }
 
         /// <summary>
@@ -66,18 +69,15 @@ namespace Apache.Ignite.Core.Interop
         public string ClassName
         {
             get { return _className; }
-            set
-            {
-                IgniteArgumentCheck.NotNullOrEmpty(value, "value");
-
-                _className = value;
-            }
         }
 
         /// <summary>
         /// Gets or sets the properties to be set on the Java object.
         /// </summary>
-        public IDictionary<string, object> Properties { get; set; }
+        public IDictionary<string, object> Properties
+        {
+            get { return _properties; }
+        }
 
         /// <summary>
         /// Creates the cache event filter that delegates to the corresponding 
Java object.

Reply via email to