ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From isap...@apache.org
Subject ignite git commit: IGNITE-7851: .NET: CacheConfiguration(string, Type[]) depricated.
Date Wed, 07 Mar 2018 10:01:36 GMT
Repository: ignite
Updated Branches:
  refs/heads/master ed76af245 -> caba7cca8


IGNITE-7851: .NET: CacheConfiguration(string, Type[]) depricated.

This closes #3595


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

Branch: refs/heads/master
Commit: caba7cca8603dc0f7ae7c0faba714f089448bf72
Parents: ed76af2
Author: apopov <tank2.alex@gmail.com>
Authored: Wed Mar 7 12:58:32 2018 +0300
Committer: Igor Sapego <isapego@gridgain.com>
Committed: Wed Mar 7 12:58:32 2018 +0300

----------------------------------------------------------------------
 .../Cache/Query/CacheQueriesCodeConfigurationTest.cs           | 2 +-
 .../Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs   | 6 ++++--
 .../Cache/Query/Linq/CacheLinqTest.Misc.cs                     | 4 ++--
 .../Cache/Query/Linq/CacheLinqTest.Numerics.cs                 | 4 ++--
 .../Apache.Ignite.Core.Tests/Client/Cache/CacheTestNoMeta.cs   | 2 +-
 .../Cache/Configuration/CacheConfiguration.cs                  | 2 ++
 .../examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs   | 2 +-
 .../dotnet/examples/Apache.Ignite.Examples/Sql/LinqExample.cs  | 5 +++--
 .../dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs   | 5 +++--
 9 files changed, 19 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/caba7cca/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesCodeConfigurationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesCodeConfigurationTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesCodeConfigurationTest.cs
index 9768fca..a05923d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesCodeConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesCodeConfigurationTest.cs
@@ -161,7 +161,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
             using (var ignite = Ignition.Start(cfg))
             {
                 var cache = ignite.GetOrCreateCache<int, AttributeQueryPerson>(new
CacheConfiguration(CacheName,
-                        typeof (AttributeQueryPerson)));
+                        new QueryEntity(typeof(int), typeof(AttributeQueryPerson))));
 
                 Assert.IsNotNull(cache);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/caba7cca/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
index 278d1fd..ceeeb37 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
@@ -616,8 +616,10 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
         [Test]
         public void TestCustomSchema()
         {
-            var doubles = GetIgnite().GetOrCreateCache<int, double>(new CacheConfiguration("doubles",
typeof(double)));
-            var strings = GetIgnite().GetOrCreateCache<int, string>(new CacheConfiguration("strings",
typeof(string)));
+            var doubles = GetIgnite().GetOrCreateCache<int, double>(new CacheConfiguration("doubles",
+                    new QueryEntity(typeof(int), typeof(double))));
+            var strings = GetIgnite().GetOrCreateCache<int, string>(new CacheConfiguration("strings",
+                    new QueryEntity(typeof(int), typeof(string))));
 
             doubles[1] = 36.6;
             strings[1] = "foo";

http://git-wip-us.apache.org/repos/asf/ignite/blob/caba7cca/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Misc.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Misc.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Misc.cs
index 3585281..d9c57d0 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Misc.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Misc.cs
@@ -237,8 +237,8 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Linq
         public void TestLocalQuery()
         {
             // Create partitioned cache
-            var cache =
-                Ignition.GetIgnite().GetOrCreateCache<int, int>(new CacheConfiguration("partCache",
typeof(int))
+            var cache = Ignition.GetIgnite().GetOrCreateCache<int, int>(new CacheConfiguration("partCache",

+                    new QueryEntity(typeof(int), typeof(int)))
                 {
                     SqlEscapeAll = GetSqlEscapeAll()
                 });

http://git-wip-us.apache.org/repos/asf/ignite/blob/caba7cca/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Numerics.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Numerics.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Numerics.cs
index 3f973aa..8dc7ddf 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Numerics.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Numerics.cs
@@ -43,8 +43,8 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Linq
         [Test]
         public void TestNumerics()
         {
-            var cache = Ignition.GetIgnite()
-                .GetOrCreateCache<int, Numerics>(new CacheConfiguration("numerics",
typeof(Numerics))
+            var cache = Ignition.GetIgnite().GetOrCreateCache<int, Numerics>(new CacheConfiguration("numerics",

+                    new QueryEntity(typeof(int), typeof(Numerics)))
                 {
                     SqlEscapeAll = GetSqlEscapeAll()
                 });

http://git-wip-us.apache.org/repos/asf/ignite/blob/caba7cca/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/CacheTestNoMeta.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/CacheTestNoMeta.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/CacheTestNoMeta.cs
index a2ca65d..0a8b146 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/CacheTestNoMeta.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/CacheTestNoMeta.cs
@@ -52,7 +52,7 @@ namespace Apache.Ignite.Core.Tests.Client.Cache
             using (var client = Ignition.StartClient(cfg))
             {
                 var serverCache = Ignition.GetIgnite().GetOrCreateCache<int?, Person>(
-                    new CacheConfiguration("person", typeof(Person)));
+                    new CacheConfiguration("person", new QueryEntity(typeof(int?), typeof(Person))));
 
                 var clientCache = client.GetCache<int?, Person>(serverCache.Name);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/caba7cca/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
index 4880eb3..06a7d72 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
@@ -218,12 +218,14 @@ namespace Apache.Ignite.Core.Cache.Configuration
         /// <summary>
         /// Initializes a new instance of the <see cref="CacheConfiguration"/> class

         /// and populates <see cref="QueryEntities"/> according to provided query types.
+        /// This constructor is depricated, please use <see cref="CacheConfiguration(string,
QueryEntity[])"/>
         /// </summary>
         /// <param name="name">Cache name.</param>
         /// <param name="queryTypes">
         /// Collection of types to be registered as query entities. These types should use

         /// <see cref="QuerySqlFieldAttribute"/> to configure query fields and properties.
         /// </param>
+        [Obsolete("This constructor is deprecated, please use CacheConfiguration(string,
QueryEntity[]) instead.")]
         public CacheConfiguration(string name, params Type[] queryTypes) : this(name)
         {
             QueryEntities = queryTypes.Select(type => new QueryEntity {ValueType = type}).ToArray();

http://git-wip-us.apache.org/repos/asf/ignite/blob/caba7cca/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs
b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs
index 82bd72a..a059b5a 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs
@@ -53,7 +53,7 @@ namespace Apache.Ignite.Examples.Datagrid
                 Console.WriteLine(">>> Cache query example started.");
 
                 var employeeCache = ignite.GetOrCreateCache<int, Employee>(
-                    new CacheConfiguration(EmployeeCacheName, typeof(Employee)));
+                    new CacheConfiguration(EmployeeCacheName, new QueryEntity(typeof(int),
typeof(Employee))));
 
                 // Populate cache with sample data entries.
                 PopulateCache(employeeCache);

http://git-wip-us.apache.org/repos/asf/ignite/blob/caba7cca/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/LinqExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/LinqExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/LinqExample.cs
index 9962b20..ee2fd90 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/LinqExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/LinqExample.cs
@@ -60,10 +60,11 @@ namespace Apache.Ignite.Examples.Sql
                 Console.WriteLine(">>> Cache LINQ example started.");
 
                 var employeeCache = ignite.GetOrCreateCache<int, Employee>(
-                    new CacheConfiguration(EmployeeCacheName, typeof(Employee)));
+                    new CacheConfiguration(EmployeeCacheName, new QueryEntity(typeof(int),
typeof(Employee))));
 
                 var employeeCacheColocated = ignite.GetOrCreateCache<AffinityKey, Employee>(
-                    new CacheConfiguration(EmployeeCacheNameColocated, typeof(Employee)));
+                    new CacheConfiguration(EmployeeCacheNameColocated, 
+                        new QueryEntity(typeof(AffinityKey), typeof(Employee))));
 
                 var organizationCache = ignite.GetOrCreateCache<int, Organization>(
                     new CacheConfiguration(OrganizationCacheName, new QueryEntity(typeof(int),
typeof(Organization))));

http://git-wip-us.apache.org/repos/asf/ignite/blob/caba7cca/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs
index 7222cfb..15b9d40 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs
@@ -58,10 +58,11 @@ namespace Apache.Ignite.Examples.Sql
                 Console.WriteLine(">>> Cache query example started.");
 
                 var employeeCache = ignite.GetOrCreateCache<int, Employee>(
-                    new CacheConfiguration(EmployeeCacheName, typeof(Employee)));
+                    new CacheConfiguration(EmployeeCacheName, new QueryEntity(typeof(int),
typeof(Employee))));
 
                 var employeeCacheColocated = ignite.GetOrCreateCache<AffinityKey, Employee>(
-                    new CacheConfiguration(EmployeeCacheNameColocated, typeof(Employee)));
+                    new CacheConfiguration(EmployeeCacheNameColocated,
+                        new QueryEntity(typeof(AffinityKey), typeof(Employee))));
 
                 var organizationCache = ignite.GetOrCreateCache<int, Organization>(
                     new CacheConfiguration(OrganizationCacheName, new QueryEntity(typeof(int),
typeof(Organization))));


Mime
View raw message