Repository: ignite Updated Branches: refs/heads/master efac70530 -> 486f8900a
IGNITE-4095 .NET: Fix deprecated CompiledQuery call in examples Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/486f8900 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/486f8900 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/486f8900 Branch: refs/heads/master Commit: 486f8900a1692fd579118fad9dbc4709b06f07f7 Parents: efac705 Author: Pavel Tupitsyn <[email protected]> Authored: Thu Nov 17 15:01:49 2016 +0300 Committer: Pavel Tupitsyn <[email protected]> Committed: Thu Nov 17 15:01:49 2016 +0300 ---------------------------------------------------------------------- .../Apache.Ignite.Examples/Datagrid/LinqExample.cs | 6 ++++-- .../Datagrid/OptimisticTransactionExample.cs | 16 ++++++++-------- .../Misc/ClientReconnectExample.cs | 10 +++++----- 3 files changed, 17 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/486f8900/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs index 86739b4..7af8569 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs @@ -123,12 +123,14 @@ namespace Apache.Ignite.Examples.Datagrid { const int zip = 94109; + var cache0 = cache.AsCacheQueryable(); + // Compile cache query to eliminate LINQ overhead on multiple runs. Func<int, IQueryCursor<ICacheEntry<int, Employee>>> qry = - CompiledQuery.Compile((int z) => cache.AsCacheQueryable().Where(emp => emp.Value.Address.Zip == z)); + CompiledQuery2.Compile((int z) => cache0.Where(emp => emp.Value.Address.Zip == z)); Console.WriteLine(); - Console.WriteLine(">>> Employees with zipcode using compiled query " + zip + ":"); + Console.WriteLine(">>> Employees with zipcode {0} using compiled query:", zip); foreach (ICacheEntry<int, Employee> entry in qry(zip)) Console.WriteLine(">>> " + entry.Value); http://git-wip-us.apache.org/repos/asf/ignite/blob/486f8900/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/OptimisticTransactionExample.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/OptimisticTransactionExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/OptimisticTransactionExample.cs index 2f9d164..0f4f149 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/OptimisticTransactionExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/OptimisticTransactionExample.cs @@ -15,16 +15,16 @@ * limitations under the License. */ -using System; -using System.Threading; -using System.Threading.Tasks; -using Apache.Ignite.Core; -using Apache.Ignite.Core.Cache; -using Apache.Ignite.Core.Cache.Configuration; -using Apache.Ignite.Core.Transactions; - namespace Apache.Ignite.Examples.Datagrid { + using System; + using System.Threading; + using System.Threading.Tasks; + using Apache.Ignite.Core; + using Apache.Ignite.Core.Cache; + using Apache.Ignite.Core.Cache.Configuration; + using Apache.Ignite.Core.Transactions; + /// <summary> /// This example demonstrates optimistic transaction concurrency control. /// <para /> http://git-wip-us.apache.org/repos/asf/ignite/blob/486f8900/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs index eb0e21b..55178b6 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs @@ -14,15 +14,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -using System; -using System.Threading; -using Apache.Ignite.Core; -using Apache.Ignite.Core.Cache; -using Apache.Ignite.Core.Common; namespace Apache.Ignite.Examples.Misc { + using System; + using System.Threading; + using Apache.Ignite.Core; + using Apache.Ignite.Core.Cache; using Apache.Ignite.Core.Cache.Configuration; + using Apache.Ignite.Core.Common; using Apache.Ignite.Core.Discovery.Tcp; using Apache.Ignite.Core.Discovery.Tcp.Static; using Apache.Ignite.Core.Events;
