You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by pt...@apache.org on 2021/01/22 05:33:05 UTC
[ignite] branch master updated: IGNITE-13979 .NET: Modernize
examples
This is an automated email from the ASF dual-hosted git repository.
ptupitsyn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 079f49d IGNITE-13979 .NET: Modernize examples
079f49d is described below
commit 079f49d1a5acbed0bdb0a25d3674fecd71769bfe
Author: Pavel Tupitsyn <pt...@apache.org>
AuthorDate: Fri Jan 22 08:32:33 2021 +0300
IGNITE-13979 .NET: Modernize examples
* Target .NET Core 2.1
* Every example resides in a separate project for better CLI and IDE experience
* NuGet-based: `examples` folder can be downloaded independently and everything just works
* Easy standalone node startup with `ServerNode` project
* More Thin Client examples
* Deliver examples as a project template with `dotnet new`: Apache.Ignite.Examples NuGet package added
* Nicer README with screenshots
---
docs/_config.yml | 7 +-
docs/_docs/quick-start/dotnet.adoc | 2 +-
.../Account.cs} | 35 +-
.../Address.cs | 31 +-
.../Apache.Ignite.Core.Tests.TestDll2.csproj | 58 ++
.../Apache.Ignite.Core.Tests.TestDll2.snk | Bin 0 -> 596 bytes
.../Properties/AssemblyInfo.cs | 22 +-
.../Apache.Ignite.Core.Tests.DotNetCore.csproj | 3 -
.../Apache.Ignite.Core.Tests.csproj | 20 +-
.../Binary/BinaryDynamicRegistrationTest.cs | 10 +-
.../Binary/TypeResolverTest.cs | 2 +-
.../Deployment/GetAddressFunc.cs | 6 +-
.../Deployment/PeerAssemblyLoadingAllApisTest.cs | 4 +-
.../Deployment/PeerAssemblyLoadingTest.cs | 4 +-
.../Apache.Ignite.Core.Tests/Examples/Example.cs | 147 +++--
.../Examples/ExamplePaths.cs} | 30 +-
.../Examples/ExamplesTest.cs | 264 --------
.../Examples/ProjectFilesTest.cs | 151 ++++-
.../{PathUtil.cs => ThickClientExamplesTest.cs} | 45 +-
...athUtil.cs => ThickExamplesExternalNodeTest.cs} | 45 +-
.../Examples/ThickExamplesTest.cs} | 27 +-
.../Examples/ThinExamplesTest.cs | 80 +++
.../Apache.Ignite.Core.Tests/ProjectFilesTest.cs | 25 +-
.../Apache.Ignite.Core/Impl/Binary/TypeResolver.cs | 9 +-
modules/platforms/dotnet/Apache.Ignite.sln | 25 +-
modules/platforms/dotnet/build.ps1 | 81 ++-
.../dotnet/examples/.template.config/template.json | 17 +
.../platforms/dotnet/examples/.vscode/launch.json | 445 ++++++++++++++
.../platforms/dotnet/examples/.vscode/tasks.json | 17 +
.../dotnet/examples/Apache.Ignite.Examples.sln | 665 ++++++++++++++++++++-
.../Apache.Ignite.Examples.sln.DotSettings | 17 +
.../Apache.Ignite.Examples.csproj | 107 ----
.../Apache.Ignite.Examples.snk | Bin 596 -> 0 bytes
.../examples/Apache.Ignite.Examples/App.config | 41 --
.../Apache.Ignite.Examples/Compute/TaskExample.cs | 134 -----
.../Datagrid/QueryExample.cs | 163 -----
.../Messaging/MessagingExample.cs | 110 ----
.../Properties/AssemblyInfo.cs | 34 --
.../Apache.Ignite.Examples/Services/IMapService.cs | 56 --
.../ThinClient/ThinClientPutGetExample.cs | 89 ---
.../ThinClient/ThinClientQueryExample.cs | 144 -----
.../ThinClient/ThinClientSqlExample.cs | 198 ------
.../Apache.Ignite.ExamplesDll.csproj | 86 ---
.../Apache.Ignite.ExamplesDll.snk | Bin 596 -> 0 bytes
.../dotnet/examples/Directory.Build.props | 42 ++
modules/platforms/dotnet/examples/README.md | 57 ++
modules/platforms/dotnet/examples/README.txt | 8 -
.../Program.cs} | 27 +-
.../dotnet/examples/ServerNode/ServerNode.csproj | 13 +
.../Cache}/CacheIncrementEntryProcessor.cs | 4 +-
.../Cache}/CachePutEntryProcessor.cs | 2 +-
.../Cache}/ContinuousQueryFilter.cs | 2 +-
.../Datagrid => Shared/Cache}/EmployeeStore.cs | 12 +-
.../Cache}/EmployeeStoreFactory.cs | 2 +-
.../Cache}/EmployeeStorePredicate.cs | 6 +-
.../Datagrid => Shared/Cache}/ScanQueryFilter.cs | 6 +-
.../Compute/AverageSalaryJob.cs | 4 +-
.../Compute/AverageSalaryTask.cs | 4 +-
.../Compute/CharacterCountFunc.cs} | 4 +-
.../Compute/CharacterCountReducer.cs | 2 +-
.../DataStructures/AtomicLongIncrementAction.cs | 2 +-
.../DataStructures/AtomicReferenceModifyAction.cs | 4 +-
.../AtomicSequenceIncrementAction.cs | 2 +-
.../Events/LocalEventListener.cs} | 4 +-
.../Messaging/LocalMessageListener.cs} | 10 +-
.../Messaging/RemoteOrderedMessageListener.cs} | 11 +-
.../Messaging/RemoteUnorderedMessageListener.cs} | 11 +-
.../Messaging/Topic.cs | 4 +-
.../Binary => Shared/Models}/Account.cs | 2 +-
.../Binary => Shared/Models}/Address.cs | 2 +-
.../Binary => Shared/Models}/Employee.cs | 2 +-
.../Binary => Shared/Models}/Organization.cs | 2 +-
.../Binary => Shared/Models}/OrganizationType.cs | 2 +-
.../Services/MapService.cs | 5 +-
.../platforms/dotnet/examples/Shared/Shared.csproj | 15 +
modules/platforms/dotnet/examples/Shared/Utils.cs | 191 ++++++
.../Thick/Cache/BinaryMode/BinaryMode.csproj | 13 +
.../Cache/BinaryMode/Program.cs} | 35 +-
.../Thick/Cache/DataStreamer/DataStreamer.csproj | 13 +
.../Cache/DataStreamer/Program.cs} | 38 +-
.../Cache/EntryProcessor/EntryProcessor.csproj | 13 +
.../Cache/EntryProcessor/Program.cs} | 34 +-
.../Cache/MultiTieredCache/MultiTieredCache.csproj | 13 +
.../Cache/MultiTieredCache/Program.cs} | 27 +-
.../Thick/Cache/NearCache/NearCache.csproj | 13 +
.../Cache/NearCache/Program.cs} | 29 +-
.../OptimisticTransaction.csproj | 13 +
.../Cache/OptimisticTransaction/Program.cs} | 27 +-
.../Cache/PutGet/Program.cs} | 32 +-
.../examples/Thick/Cache/PutGet/PutGet.csproj | 13 +
.../Cache/QueryContinuous/Program.cs} | 29 +-
.../Cache/QueryContinuous/QueryContinuous.csproj | 13 +
.../examples/Thick/Cache/QueryFullText/Program.cs | 62 ++
.../Thick/Cache/QueryFullText/QueryFullText.csproj | 13 +
.../examples/Thick/Cache/QueryScan/Program.cs | 65 ++
.../Thick/Cache/QueryScan/QueryScan.csproj | 13 +
.../Cache/Store/Program.cs} | 31 +-
.../dotnet/examples/Thick/Cache/Store/Store.csproj | 13 +
.../Cache/Transaction/Program.cs} | 29 +-
.../Thick/Cache/Transaction/Transaction.csproj | 13 +
.../Cache/TransactionDeadlockDetection/Program.cs} | 30 +-
.../TransactionDeadlockDetection.csproj | 13 +
.../dotnet/examples/Thick/Compute/Func/Func.csproj | 13 +
.../Compute/Func/Program.cs} | 32 +-
.../PeerAssemblyLoading/PeerAssemblyLoading.csproj | 16 +
.../Compute/PeerAssemblyLoading/Program.cs} | 37 +-
.../dotnet/examples/Thick/Compute/Task/Program.cs | 61 ++
.../dotnet/examples/Thick/Compute/Task/Task.csproj | 13 +
.../DataStructures/AtomicLong/AtomicLong.csproj | 13 +
.../DataStructures/AtomicLong/Program.cs} | 25 +-
.../AtomicReference/AtomicReference.csproj | 13 +
.../DataStructures/AtomicReference/Program.cs} | 26 +-
.../AtomicSequence/AtomicSequence.csproj | 13 +
.../DataStructures/AtomicSequence/Program.cs} | 31 +-
.../Misc/ClientReconnect/ClientReconnect.csproj | 13 +
.../Misc/ClientReconnect/Program.cs} | 42 +-
.../examples/Thick/Misc/Events/Events.csproj | 13 +
.../Misc/Events/Program.cs} | 32 +-
.../examples/Thick/Misc/Lifecycle/Lifecycle.csproj | 13 +
.../Misc/Lifecycle/Program.cs} | 41 +-
.../examples/Thick/Misc/Messaging/Messaging.csproj | 13 +
.../examples/Thick/Misc/Messaging/Program.cs | 100 ++++
.../Misc/Services/Program.cs} | 50 +-
.../examples/Thick/Misc/Services/Services.csproj | 13 +
modules/platforms/dotnet/examples/Thick/README.md | 4 +
.../dotnet/examples/Thick/Sql/Ddl/Ddl.csproj | 13 +
.../SqlDdlExample.cs => Thick/Sql/Ddl/Program.cs} | 45 +-
.../dotnet/examples/Thick/Sql/Dml/Dml.csproj | 13 +
.../SqlDmlExample.cs => Thick/Sql/Dml/Program.cs} | 32 +-
.../dotnet/examples/Thick/Sql/Linq/Linq.csproj | 13 +
.../LinqExample.cs => Thick/Sql/Linq/Program.cs} | 88 +--
.../Sql/SqlExample.cs => Thick/Sql/Sql/Program.cs} | 53 +-
.../dotnet/examples/Thick/Sql/Sql/Sql.csproj | 13 +
.../Cache/BinaryModeThin/BinaryModeThin.csproj | 13 +
.../Cache/BinaryModeThin/Program.cs} | 69 +--
.../OptimisticTransactionThin.csproj | 13 +
.../Cache/OptimisticTransactionThin/Program.cs} | 50 +-
.../Cache/PutGetThin/Program.cs} | 61 +-
.../Thin/Cache/PutGetThin/PutGetThin.csproj | 13 +
.../Cache/QueryContinuousThin/Program.cs} | 43 +-
.../QueryContinuousThin/QueryContinuousThin.csproj | 13 +
.../examples/Thin/Cache/QueryScanThin/Program.cs | 71 +++
.../Thin/Cache/QueryScanThin/QueryScanThin.csproj | 13 +
.../Cache/TransactionThin/Program.cs} | 43 +-
.../Cache/TransactionThin/TransactionThin.csproj | 13 +
.../Misc/ServicesThin/Program.cs} | 59 +-
.../Thin/Misc/ServicesThin/ServicesThin.csproj | 13 +
modules/platforms/dotnet/examples/Thin/README.md | 3 +
.../examples/Thin/Sql/DdlThin/DdlThin.csproj | 13 +
.../Sql/DdlThin/Program.cs} | 56 +-
.../examples/Thin/Sql/DmlThin/DmlThin.csproj | 13 +
.../Sql/DmlThin/Program.cs} | 51 +-
.../examples/Thin/Sql/LinqThin/LinqThin.csproj | 13 +
.../Sql/LinqThin/Program.cs} | 114 ++--
.../SqlExample.cs => Thin/Sql/SqlThin/Program.cs} | 76 +--
.../examples/Thin/Sql/SqlThin/SqlThin.csproj | 13 +
.../dotnetcore/Apache.Ignite.Examples.csproj | 29 -
.../dotnet/examples/dotnetcore/App.config | 38 --
.../dotnet/examples/dotnetcore/Employee.cs | 67 ---
.../dotnet/examples/dotnetcore/LinqExample.cs | 239 --------
.../dotnet/examples/dotnetcore/Program.cs | 109 ----
.../dotnet/examples/dotnetcore/PutGetExample.cs | 122 ----
.../dotnet/examples/dotnetcore/README.txt | 8 -
.../dotnet/examples/dotnetcore/SqlExample.cs | 191 ------
.../dotnet/examples/images/rider-sidebar.png | Bin 0 -> 48065 bytes
modules/platforms/dotnet/examples/images/rider.png | Bin 0 -> 21953 bytes
.../platforms/dotnet/examples/images/vs-code.png | Bin 0 -> 29808 bytes
modules/platforms/dotnet/examples/images/vs.png | Bin 0 -> 8262 bytes
.../platforms/dotnet/run-dotnetcore-examples.bat | 27 -
modules/platforms/dotnet/templates/README.md | 32 +
.../.template.config/template.json | 16 +
.../Apache.Ignite.Example/ExampleProject.csproj | 13 +
.../internal/Apache.Ignite.Example/Program.cs} | 37 +-
.../.template.config/template.json | 16 +
.../ExampleProjectThin.csproj | 13 +
.../internal/Apache.Ignite.ExampleThin/Program.cs | 57 ++
.../Apache.Ignite.Examples.csproj | 32 +
177 files changed, 3693 insertions(+), 3646 deletions(-)
diff --git a/docs/_config.yml b/docs/_config.yml
index 0562d1a..b46f855 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -24,6 +24,7 @@ attrs: &asciidoc_attributes
javaCodeDir: code-snippets/java/src/main/java/org/apache/ignite/snippets
csharpCodeDir: code-snippets/dotnet
githubUrl: https://github.com/apache/ignite/tree/master
+ githubVersionUrl: https://github.com/apache/ignite/tree/ignite-{version}
docSourceUrl: https://github.com/apache/ignite/tree/IGNITE-7595/docs
collections:
docs:
@@ -39,8 +40,8 @@ defaults:
scope:
path: '_docs'
values:
- toc: ignite
+ toc: ignite
asciidoctor:
- base_dir: _docs/
+ base_dir: _docs/
attributes: *asciidoc_attributes
-
+
diff --git a/docs/_docs/quick-start/dotnet.adoc b/docs/_docs/quick-start/dotnet.adoc
index e9650c7..8567e36 100644
--- a/docs/_docs/quick-start/dotnet.adoc
+++ b/docs/_docs/quick-start/dotnet.adoc
@@ -88,7 +88,7 @@ From here, you may want to:
* Check out the link:thin-clients/dotnet-thin-client[.NET thin client] that provides a lightweight form of connectivity
to Ignite clusters
-* Explore the link:{githubUrl}/modules/platforms/dotnet/examples[additional examples] included with Ignite
+* Explore the link:{githubVersionUrl}/modules/platforms/dotnet/examples[additional examples] included with Ignite
* Refer to the link:net-specific[NET-specific section] of the documentation to learn more about capabilities
that are available for C# and .NET applications.
diff --git a/modules/platforms/dotnet/examples/dotnetcore/Organization.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll2/Account.cs
similarity index 65%
rename from modules/platforms/dotnet/examples/dotnetcore/Organization.cs
rename to modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll2/Account.cs
index 5d09e6b..8a48ce6 100644
--- a/modules/platforms/dotnet/examples/dotnetcore/Organization.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll2/Account.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,44 +15,43 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples
+namespace Apache.Ignite.Core.Tests.TestDll2
{
- using System;
- using Core.Cache.Configuration;
-
/// <summary>
- /// Organization.
+ /// Test account.
/// </summary>
- public class Organization
+ public class Account
{
/// <summary>
/// Constructor.
/// </summary>
- /// <param name="name">Name.</param>
- public Organization(string name)
+ /// <param name="id">Account ID.</param>
+ /// <param name="balance">Account balance.</param>
+ public Account(int id, decimal balance)
{
- Name = name;
- LastUpdated = DateTime.UtcNow;
+ Id = id;
+ Balance = balance;
}
/// <summary>
- /// Name.
+ /// Account ID.
/// </summary>
- [QuerySqlField(IsIndexed = true)]
- public string Name { get; set; }
+ public int Id { get; set; }
/// <summary>
- /// Last update time.
+ /// Account balance.
/// </summary>
- [QuerySqlField]
- public DateTime LastUpdated { get; set; }
+ public decimal Balance { get; set; }
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
+ /// <returns>
+ /// A string that represents the current object.
+ /// </returns>
public override string ToString()
{
- return $"{typeof(Organization).Name} [{nameof(Name)}={Name}, {nameof(LastUpdated)}={LastUpdated}]";
+ return string.Format("{0} [id={1}, balance={2}]", typeof(Account).Name, Id, Balance);
}
}
}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Address.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll2/Address.cs
similarity index 66%
copy from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Address.cs
copy to modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll2/Address.cs
index 0bacdb7..05db724 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Address.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll2/Address.cs
@@ -15,15 +15,12 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Binary
+namespace Apache.Ignite.Core.Tests.TestDll2
{
- using Apache.Ignite.Core.Binary;
- using Apache.Ignite.Core.Cache.Configuration;
-
/// <summary>
/// Address.
/// </summary>
- public class Address : IBinarizable
+ public class Address
{
/// <summary>
/// Constructor.
@@ -39,36 +36,14 @@ namespace Apache.Ignite.ExamplesDll.Binary
/// <summary>
/// Street.
/// </summary>
- [QueryTextField]
public string Street { get; set; }
/// <summary>
/// ZIP code.
/// </summary>
- [QuerySqlField(IsIndexed = true)]
public int Zip { get; set; }
- /// <summary>
- /// Writes this object to the given writer.
- /// </summary>
- /// <param name="writer">Writer.</param>
- public void WriteBinary(IBinaryWriter writer)
- {
- writer.WriteString("street", Street);
- writer.WriteInt("zip", Zip);
- }
-
- /// <summary>
- /// Reads this object from the given reader.
- /// </summary>
- /// <param name="reader">Reader.</param>
- public void ReadBinary(IBinaryReader reader)
- {
- Street = reader.ReadString("street");
- Zip = reader.ReadInt("zip");
- }
-
- /// <summary>
+ /// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll2/Apache.Ignite.Core.Tests.TestDll2.csproj b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll2/Apache.Ignite.Core.Tests.TestDll2.csproj
new file mode 100644
index 0000000..04e7f60
--- /dev/null
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll2/Apache.Ignite.Core.Tests.TestDll2.csproj
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{4D8DDA6D-4616-4DF1-A2DA-22FB3A5EC817}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Apache.Ignite.Core.Tests.TestDll2</RootNamespace>
+ <AssemblyName>Apache.Ignite.Core.Tests.TestDll2</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup>
+ <SignAssembly>true</SignAssembly>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AssemblyOriginatorKeyFile>Apache.Ignite.Core.Tests.TestDll2.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\Debug\</OutputPath>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
+ <OutputPath>bin\Release\</OutputPath>
+ <Optimize>true</Optimize>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ </PropertyGroup>
+ <PropertyGroup>
+ <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Account.cs" />
+ <Compile Include="Address.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Apache.Ignite.Core.Tests.TestDll2.snk" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll2/Apache.Ignite.Core.Tests.TestDll2.snk b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll2/Apache.Ignite.Core.Tests.TestDll2.snk
new file mode 100644
index 0000000..10803d7
Binary files /dev/null and b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll2/Apache.Ignite.Core.Tests.TestDll2.snk differ
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll2/Properties/AssemblyInfo.cs
similarity index 64%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
rename to modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll2/Properties/AssemblyInfo.cs
index ba25487..5ba55a0 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Properties/AssemblyInfo.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll2/Properties/AssemblyInfo.cs
@@ -18,8 +18,8 @@
using System.Reflection;
using System.Runtime.InteropServices;
-[assembly: AssemblyTitle("Apache Ignite.NET Examples Library")]
-[assembly: AssemblyDescription("")]
+[assembly: AssemblyTitle("Apache.Ignite.Core.Tests.TestDll2")]
+[assembly: AssemblyDescription("Apache Ignite.NET Tests Library 2")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Apache Software Foundation")]
[assembly: AssemblyProduct("Apache Ignite.NET")]
@@ -27,8 +27,16 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-[assembly: ComVisible(false)]
-
-[assembly: Guid("ce65ec7c-d3cf-41ad-8f45-f90d5af68d77")]
-
-[assembly: AssemblyVersion("1.0.*")]
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("2.11.0.51807")]
+[assembly: AssemblyFileVersion("2.11.0.51807")]
+[assembly: AssemblyInformationalVersion("2.11.0")]
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.DotNetCore.csproj b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.DotNetCore.csproj
index 884009a..8a30af4 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.DotNetCore.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.DotNetCore.csproj
@@ -41,7 +41,6 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Remove="Deployment\**" />
- <None Remove="Examples\**" />
<None Update="Config\ignite-halthandler-dotnet-cfg.xml" CopyToOutputDirectory="PreserveNewest" />
<None Update="Config\native-client-test-cache-affinity.xml" CopyToOutputDirectory="PreserveNewest" />
@@ -102,13 +101,11 @@
<ItemGroup>
<Compile Remove="Deployment\**" />
- <Compile Remove="Examples\**" />
<Compile Remove="Compute\Forked\**" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Remove="Deployment\**" />
- <EmbeddedResource Remove="Examples\**" />
<EmbeddedResource Remove="Compute\Forked\**" />
</ItemGroup>
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
index 19e50f0..7dc8fc3 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
@@ -360,10 +360,6 @@
<Compile Include="DataStructures\AtomicSequenceTest.cs" />
<Compile Include="DeploymentTest.cs" />
<Compile Include="EventsTest.cs" />
- <Compile Include="Examples\Example.cs" />
- <Compile Include="Examples\ExamplesTest.cs" />
- <Compile Include="Examples\PathUtil.cs" />
- <Compile Include="Examples\ProjectFilesTest.cs" />
<Compile Include="ExceptionsTest.cs" />
<Compile Include="ExecutableTest.cs" />
<Compile Include="FutureTest.cs" />
@@ -411,6 +407,11 @@
<Compile Include="WindowsServiceTest.cs" />
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="..\Apache.Ignite.Core.Tests.TestDll2\Apache.Ignite.Core.Tests.TestDll2.csproj">
+ <Project>{f4a69e2d-908e-4f0f-a794-84d508d60e5f}</Project>
+ <Name>Apache.Ignite.Core.Tests.TestDll2</Name>
+ <Aliases>TestDll2</Aliases>
+ </ProjectReference>
<ProjectReference Include="..\Apache.Ignite.Core\Apache.Ignite.Core.csproj">
<Project>{4CD2F726-7E2B-46C4-A5BA-057BB82EECB6}</Project>
<Name>Apache.Ignite.Core</Name>
@@ -431,15 +432,6 @@
<Project>{27F7F3C6-BDDE-43A9-B565-856F8395A04B}</Project>
<Name>Apache.Ignite</Name>
</ProjectReference>
- <ProjectReference Include="..\examples\Apache.Ignite.ExamplesDll\Apache.Ignite.ExamplesDll.csproj">
- <Project>{dfb08363-202e-412d-8812-349ef10a8702}</Project>
- <Name>Apache.Ignite.ExamplesDll</Name>
- <Aliases>ExamplesDll</Aliases>
- </ProjectReference>
- <ProjectReference Include="..\examples\Apache.Ignite.Examples\Apache.Ignite.Examples.csproj">
- <Project>{069fa680-3c4d-43a9-b84f-e67513b87827}</Project>
- <Name>Apache.Ignite.Examples</Name>
- </ProjectReference>
<ProjectReference Include="..\Apache.Ignite.Core.Tests.TestDll\Apache.Ignite.Core.Tests.TestDll.csproj">
<Project>{F4A69E2D-908E-4F0F-A794-84D508D60E5F}</Project>
<Name>Apache.Ignite.Core.Tests.TestDll</Name>
@@ -623,4 +615,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project>
+</Project>
\ No newline at end of file
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryDynamicRegistrationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryDynamicRegistrationTest.cs
index 455c1a9..d8d706e 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryDynamicRegistrationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/BinaryDynamicRegistrationTest.cs
@@ -19,9 +19,9 @@
namespace Apache.Ignite.Core.Tests.Binary
{
#if !NETCOREAPP
- extern alias ExamplesDll;
- using Apache.Ignite.ExamplesDll.Binary;
- using ExamplesAccount = ExamplesDll::Apache.Ignite.ExamplesDll.Binary.Account;
+ extern alias TestDll2;
+ using Apache.Ignite.Core.Tests.TestDll2;
+ using ExamplesAccount = TestDll2.Apache.Ignite.Core.Tests.TestDll2.Account;
#endif
using System;
@@ -596,10 +596,10 @@ namespace Apache.Ignite.Core.Tests.Binary
}
#if !NETCOREAPP
-namespace Apache.Ignite.ExamplesDll.Binary
+namespace Apache.Ignite.Core.Tests.TestDll2
{
/// <summary>
- /// Copy of Account class in ExamplesDll. Same name and namespace, different assembly.
+ /// Copy of Account class in TestDll2. Same name and namespace, different assembly.
/// </summary>
public class Account
{
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/TypeResolverTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/TypeResolverTest.cs
index dd1cb35..abe78c6 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/TypeResolverTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Binary/TypeResolverTest.cs
@@ -178,7 +178,7 @@ namespace Apache.Ignite.Core.Tests.Binary
[Test]
public void TestReferencedAssemblyLoading()
{
- const string dllName = "Apache.Ignite.Core.Tests.TestDll";
+ const string dllName = "Apache.Ignite.Core.Tests.TestDll,";
const string typeName = "Apache.Ignite.Core.Tests.TestDll.TestClass";
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Deployment/GetAddressFunc.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Deployment/GetAddressFunc.cs
index 9d08873..62c44dc 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Deployment/GetAddressFunc.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Deployment/GetAddressFunc.cs
@@ -17,9 +17,9 @@
namespace Apache.Ignite.Core.Tests.Deployment
{
- extern alias ExamplesDll;
+ extern alias TestDll2;
using Apache.Ignite.Core.Compute;
- using Address = ExamplesDll::Apache.Ignite.ExamplesDll.Binary.Address;
+ using Address = TestDll2.Apache.Ignite.Core.Tests.TestDll2.Address;
/// <summary>
/// Function that returns an instance of a class from another assembly.
@@ -32,4 +32,4 @@ namespace Apache.Ignite.Core.Tests.Deployment
return new Address("addr" + arg, arg);
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Deployment/PeerAssemblyLoadingAllApisTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Deployment/PeerAssemblyLoadingAllApisTest.cs
index 443ea00..669fd71 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Deployment/PeerAssemblyLoadingAllApisTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Deployment/PeerAssemblyLoadingAllApisTest.cs
@@ -17,13 +17,13 @@
namespace Apache.Ignite.Core.Tests.Deployment
{
- extern alias ExamplesDll;
+ extern alias TestDll2;
using System.Linq;
using Apache.Ignite.Core.Tests.Compute;
using Apache.Ignite.Core.Tests.Process;
using Apache.Ignite.NLog;
using NUnit.Framework;
- using Address = ExamplesDll::Apache.Ignite.ExamplesDll.Binary.Address;
+ using Address = TestDll2::Apache.Ignite.Core.Tests.TestDll2.Address;
/// <summary>
/// Tests all APIs that support peer assembly loading.
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Deployment/PeerAssemblyLoadingTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Deployment/PeerAssemblyLoadingTest.cs
index c6258b2..21296f5 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Deployment/PeerAssemblyLoadingTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Deployment/PeerAssemblyLoadingTest.cs
@@ -17,7 +17,7 @@
namespace Apache.Ignite.Core.Tests.Deployment
{
- extern alias ExamplesDll;
+ extern alias TestDll2;
using System;
using System.IO;
using System.Threading;
@@ -30,7 +30,7 @@ namespace Apache.Ignite.Core.Tests.Deployment
using Apache.Ignite.Core.Tests.Process;
using Apache.Ignite.NLog;
using NUnit.Framework;
- using Address = ExamplesDll::Apache.Ignite.ExamplesDll.Binary.Address;
+ using Address = TestDll2::Apache.Ignite.Core.Tests.TestDll2.Address;
/// <summary>
/// Tests peer assembly loading feature:
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/Example.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/Example.cs
index 2859e5f..1f14439 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/Example.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/Example.cs
@@ -21,8 +21,7 @@ namespace Apache.Ignite.Core.Tests.Examples
using System.Collections.Generic;
using System.IO;
using System.Linq;
- using System.Text.RegularExpressions;
- using Apache.Ignite.Examples.Compute;
+ using System.Reflection;
using NUnit.Framework;
/// <summary>
@@ -30,17 +29,54 @@ namespace Apache.Ignite.Core.Tests.Examples
/// </summary>
public class Example
{
- /** Execute action */
- private Action _runAction;
+ /** All projects. */
+ public static readonly Example[] AllProjects = GetExamples()
+ .OrderBy(x => x.Name)
+ .ToArray();
- /** Config url */
- public string ConfigPath { get; private set; }
+ /** All examples. */
+ public static readonly Example[] AllExamples = AllProjects.Where(p => p.Name != "ServerNode").ToArray();
- /** Dll load flag */
- public bool NeedsTestDll { get; private set; }
+ /** Method invoke flags. */
+ private const BindingFlags InvokeFlags = BindingFlags.Static | BindingFlags.Public | BindingFlags.InvokeMethod;
- /** Name */
- public Type ExampleType { get; private set; }
+ /** Example name. */
+ public string Name { get; }
+
+ /** Project file. */
+ public string ProjectFile { get; }
+
+ /** Assembly path. */
+ public string AssemblyFile { get; }
+
+ /** Whether this is a thin client example (needs a server node). */
+ public bool IsThin => ProjectFile.Contains("Thin");
+
+ /** Example source code. */
+ public string SourceCode { get; }
+
+ /** Whether this example runs in thick client mode. */
+ public bool IsClient { get; }
+
+ /** Whether this example requires an external node. */
+ public bool RequiresExternalNode { get; }
+
+ /** Whether this example disallows external nodes. */
+ public bool DisallowsExternalNode { get; }
+
+ /// <summary>
+ /// Initializes a new instance of <see cref="Example"/> class.
+ /// </summary>
+ private Example(string name, string projectFile, string assemblyFile, string sourceCode)
+ {
+ Name = name;
+ ProjectFile = projectFile;
+ AssemblyFile = assemblyFile;
+ SourceCode = sourceCode;
+ RequiresExternalNode = sourceCode.Contains("ServerNode project");
+ DisallowsExternalNode = sourceCode.Contains("without external node");
+ IsClient = sourceCode.Contains("GetClientNodeConfiguration") && !DisallowsExternalNode;
+ }
/// <summary>
/// Runs this example.
@@ -49,81 +85,66 @@ namespace Apache.Ignite.Core.Tests.Examples
{
try
{
- _runAction();
+ Assert.IsTrue(File.Exists(AssemblyFile),
+ $"Assembly not found: {AssemblyFile}. " +
+ "Make sure to build IgniteExamples.sln. This usually happens as part of build.ps1 execution.");
+
+ var assembly = Assembly.LoadFrom(AssemblyFile);
+
+ var programType = assembly.GetTypes().SingleOrDefault(t => t.Name == "Program");
+ Assert.IsNotNull(programType, $"Assembly {AssemblyFile} does not have Program class.");
+
+ programType.InvokeMember("Main", InvokeFlags, null, null, null);
}
- catch (InvalidOperationException ex)
+ catch (TargetInvocationException ex)
{
// Each example has a ReadKey at the end, which throws an exception in test environment.
- if (ex.Message != "Cannot read keys when either application does not have a console or " +
- "when console input has been redirected from a file. Try Console.Read.")
+ if (ex.InnerException is InvalidOperationException inner &&
+ inner.Message.StartsWith("Cannot read keys"))
{
- throw;
+ return;
}
- return;
+ throw;
}
- throw new Exception("ReadKey missing at the end of the example.");
+ throw new Exception("ReadKey is missing at the end of the example.");
}
- /// <summary>
- /// Gets all examples.
- /// </summary>
- public static IEnumerable<Example> GetExamples()
+ /** <inheritdoc /> */
+ public override string ToString()
{
- var examplesAsm = typeof (ClosureExample).Assembly;
-
- var sourceFiles = Directory.GetFiles(PathUtil.ExamplesSourcePath, "*.cs", SearchOption.AllDirectories)
- .Where(x => !x.Contains("dotnetcore")).ToArray();
-
- Assert.IsTrue(sourceFiles.Any());
-
- var types = examplesAsm.GetTypes().Where(x => x.GetMethod("Main") != null).OrderBy(x => x.Name).ToArray();
-
- Assert.IsTrue(types.Any());
-
- foreach (var type in types)
- {
- var sourceFile = sourceFiles.Single(
- x => x.EndsWith(string.Format("{0}{1}.cs", Path.DirectorySeparatorChar, type.Name)));
-
- var sourceCode = File.ReadAllText(sourceFile);
-
- yield return new Example
- {
- ConfigPath = GetConfigPath(sourceCode),
- NeedsTestDll = sourceCode.Contains("-assembly="),
- _runAction = GetRunAction(type),
- ExampleType = type
- };
- }
+ // This will be displayed by the test runner in CI and IDE.
+ return Name;
}
/// <summary>
- /// Gets the run action.
+ /// Gets the example descriptor.
/// </summary>
- private static Action GetRunAction(Type type)
+ private static Example GetExample(string projFile)
{
- var mainMethod = type.GetMethod("Main");
- Assert.IsNotNull(mainMethod);
- return (Action) Delegate.CreateDelegate(typeof (Action), mainMethod);
+ var name = Path.GetFileNameWithoutExtension(projFile);
+ var path = Path.GetDirectoryName(projFile);
+ var asmFile = Path.Combine(path, "bin", "Debug", "netcoreapp2.1", $"{name}.dll");
+
+ var sourceFile = Path.Combine(path, "Program.cs");
+ var sourceCode = File.ReadAllText(sourceFile);
+
+ return new Example(name, projFile, asmFile, sourceCode);
}
/// <summary>
- /// Gets the spring configuration URL.
+ /// Gets all examples.
/// </summary>
- private static string GetConfigPath(string code)
+ private static IEnumerable<Example> GetExamples()
{
- var match = Regex.Match(code, "-configFileName=(.*?.config)");
+ var projFiles = Directory
+ .GetFiles(ExamplePaths.SourcesPath, "*.csproj", SearchOption.AllDirectories)
+ .Where(x => !x.EndsWith("Shared.csproj")).ToArray();
- return match.Success ? match.Groups[1].Value : null;
- }
+ Assert.IsTrue(projFiles.Any());
- /** <inheritdoc /> */
- public override string ToString()
- {
- // This will be displayed in TeamCity and R# test runner
- return ExampleType.Name;
+ return projFiles.Select(projFile => GetExample(projFile));
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStoreFactory.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplePaths.cs
similarity index 56%
copy from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStoreFactory.cs
copy to modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplePaths.cs
index 643fc44..693060b 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStoreFactory.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplePaths.cs
@@ -15,24 +15,26 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Datagrid
+namespace Apache.Ignite.Core.Tests.Examples
{
- using System;
- using Apache.Ignite.Core.Cache.Store;
- using Apache.Ignite.Core.Common;
+ using System.IO;
/// <summary>
- /// Employee store factory.
+ /// Example paths.
/// </summary>
- [Serializable]
- public class EmployeeStoreFactory : IFactory<ICacheStore>
+ public static class ExamplePaths
{
- /// <summary>
- /// Creates an instance of the cache store.
- /// </summary>
- public ICacheStore CreateInstance()
- {
- return new EmployeeStore();
- }
+ /** */
+ public static readonly string SourcesPath =
+ Path.Combine(Impl.Common.IgniteHome.Resolve(), "modules", "platforms", "dotnet", "examples");
+
+ /** */
+ public static readonly string SlnFile = Path.Combine(SourcesPath, "Apache.Ignite.Examples.sln");
+
+ /** */
+ public static readonly string LaunchJsonFile = Path.Combine(SourcesPath, ".vscode", "launch.json");
+
+ /** */
+ public static readonly string TasksJsonFile = Path.Combine(SourcesPath, ".vscode", "tasks.json");
}
}
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs
deleted file mode 100644
index 77af5aa..0000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs
+++ /dev/null
@@ -1,264 +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.Tests.Examples
-{
- extern alias ExamplesDll;
- using System;
- using System.Collections.Generic;
- using System.Configuration;
- using System.IO;
- using System.Linq;
- using Apache.Ignite.Core.Impl.Common;
- using Apache.Ignite.Core.Tests.Process;
- using Apache.Ignite.Examples.Compute;
- using Apache.Ignite.Examples.Datagrid;
- using Apache.Ignite.Examples.Messaging;
- using Apache.Ignite.Examples.Misc;
- using Apache.Ignite.Examples.Sql;
- using Apache.Ignite.Examples.ThinClient;
- using NUnit.Framework;
-
- /// <summary>
- /// Tests all examples in various modes.
- /// </summary>
- [Category(TestUtils.CategoryExamples)]
- public class ExamplesTest
- {
- /** */
- private static readonly Example[] AllExamples = Example.GetExamples().ToArray();
-
- /** */
- private static readonly Type[] LocalOnlyExamples =
- {
- typeof(LifecycleExample), typeof(ClientReconnectExample), typeof(MultiTieredCacheExample)
- };
-
- /** */
- private static readonly Type[] RemoteOnlyExamples =
- {
- typeof(PeerAssemblyLoadingExample), typeof(MessagingExample), typeof(NearCacheExample),
- typeof(ThinClientPutGetExample), typeof(ThinClientQueryExample), typeof(ThinClientSqlExample)
- };
-
- /** */
- private static readonly Type[] NoDllExamples =
- {
- typeof(BinaryModeExample), typeof(NearCacheExample), typeof(PeerAssemblyLoadingExample),
- typeof(ThinClientPutGetExample), typeof(SqlExample), typeof(LinqExample), typeof(SqlDmlExample),
- typeof(SqlDdlExample), typeof(ThinClientSqlExample)
- };
-
- /** Config file path. */
- private string _configPath;
-
- /** */
- private IDisposable _changedConfig;
-
- /** */
- private IDisposable _changedEnvVar;
-
- /** */
- private bool _remoteNodeStarted;
-
- /// <summary>
- /// Tests the example in a single node mode.
- /// </summary>
- /// <param name="example">The example to run.</param>
- [Test, TestCaseSource("TestCasesLocal")]
- public void TestLocalNode(Example example)
- {
- StopRemoteNodes();
-
- if (LocalOnlyExamples.Contains(example.ExampleType))
- {
- Assert.IsFalse(example.NeedsTestDll, "Local-only example should not mention test dll.");
- Assert.IsNull(example.ConfigPath, "Local-only example should not mention app.config path.");
- }
-
- example.Run();
- }
-
- /// <summary>
- /// Tests the example with standalone Apache.Ignite.exe nodes.
- /// </summary>
- /// <param name="example">The example to run.</param>
- [Test, TestCaseSource("TestCasesRemote")]
- public void TestRemoteNodes(Example example)
- {
- TestRemoteNodes(example, false);
- }
-
- /// <summary>
- /// Tests the example with standalone Apache.Ignite.exe nodes while local node is in client mode.
- /// </summary>
- /// <param name="example">The example to run.</param>
- [Test, TestCaseSource("TestCasesRemote")]
- public void TestRemoteNodesClientMode(Example example)
- {
- TestRemoteNodes(example, true);
- }
-
- /// <summary>
- /// Tests the example with standalone Apache.Ignite.exe nodes.
- /// </summary>
- /// <param name="example">The example to run.</param>
- /// <param name="clientMode">Client mode flag.</param>
- private void TestRemoteNodes(Example example, bool clientMode)
- {
- Assert.IsTrue(PathUtil.ExamplesAppConfigPath.EndsWith(example.ConfigPath,
- StringComparison.OrdinalIgnoreCase), "All examples should use the same app.config.");
-
- Assert.IsTrue(example.NeedsTestDll || NoDllExamples.Contains(example.ExampleType),
- "Examples that allow standalone nodes should mention test dll.");
-
- StartRemoteNodes();
-
- Ignition.ClientMode = clientMode;
-
- // Run twice to catch issues with standalone node state
- example.Run();
- example.Run();
- }
-
- /// <summary>
- /// Starts standalone node.
- /// </summary>
- private void StartRemoteNodes()
- {
- if (_remoteNodeStarted)
- return;
-
- // Start a grid to monitor topology;
- // Stop it after topology check so we don't interfere with example.
- Ignition.ClientMode = false;
-
- var fileMap = new ExeConfigurationFileMap { ExeConfigFilename = _configPath };
- var config = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None);
- var section = (IgniteConfigurationSection) config.GetSection("igniteConfiguration");
-
- // Disable client connector so that temporary node does not occupy the port.
- var cfg = new IgniteConfiguration(section.IgniteConfiguration)
- {
- ClientConnectorConfigurationEnabled = false,
- CacheConfiguration = null
- };
-
- using (var ignite = Ignition.Start(cfg))
- {
- var args = new List<string>
- {
- "-configFileName=" + _configPath,
- "-assembly=" + typeof(ExamplesDll::Apache.Ignite.ExamplesDll.Compute.AverageSalaryJob)
- .Assembly.Location
- };
-
- var proc = new IgniteProcess(args.ToArray());
-
- Assert.IsTrue(ignite.WaitTopology(2),
- string.Format("Standalone node failed to join topology: [{0}]", proc.GetInfo()));
-
- Assert.IsTrue(proc.Alive, string.Format("Standalone node stopped unexpectedly: [{0}]",
- proc.GetInfo()));
- }
-
- _remoteNodeStarted = true;
- }
-
- /// <summary>
- /// Stops standalone nodes.
- /// </summary>
- private void StopRemoteNodes()
- {
- if (_remoteNodeStarted)
- {
- IgniteProcess.KillAll();
- _remoteNodeStarted = false;
- }
- }
-
- /// <summary>
- /// Fixture setup.
- /// </summary>
- [TestFixtureSetUp]
- public void FixtureSetUp()
- {
- _changedEnvVar = EnvVar.Set(Classpath.EnvIgniteNativeTestClasspath, bool.TrueString);
-
- Directory.SetCurrentDirectory(PathUtil.IgniteHome);
-
- // Copy file to a temp location and replace multicast IP finder with static.
- _configPath = Path.GetTempFileName();
-
- var configText = File.ReadAllText(PathUtil.ExamplesAppConfigPath)
- .Replace("TcpDiscoveryMulticastIpFinder", "TcpDiscoveryStaticIpFinder");
-
- File.WriteAllText(_configPath, configText);
-
- _changedConfig = TestAppConfig.Change(_configPath);
- }
-
- /// <summary>
- /// Fixture teardown.
- /// </summary>
- [TestFixtureTearDown]
- public void FixtureTearDown()
- {
- _changedConfig.Dispose();
-
- Ignition.StopAll(true);
-
- IgniteProcess.KillAll();
-
- File.Delete(_configPath);
-
- _changedEnvVar.Dispose();
- }
-
- /// <summary>
- /// Test teardown.
- /// </summary>
- [TearDown]
- public void TearDown()
- {
- Ignition.ClientMode = false;
- }
-
- /// <summary>
- /// Gets the test cases for local-only scenario.
- /// </summary>
- // ReSharper disable once MemberCanBePrivate.Global
- // ReSharper disable once MemberCanBeMadeStatic.Global
- public IEnumerable<Example> TestCasesLocal
- {
- get { return AllExamples.Where(x => !RemoteOnlyExamples.Contains(x.ExampleType)); }
- }
-
- /// <summary>
- /// Gets the test cases for remote node scenario.
- /// </summary>
- // ReSharper disable once MemberCanBePrivate.Global
- // ReSharper disable once MemberCanBeMadeStatic.Global
- public IEnumerable<Example> TestCasesRemote
- {
- get
- {
- return AllExamples.Where(x => !LocalOnlyExamples.Contains(x.ExampleType));
- }
- }
- }
-}
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ProjectFilesTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ProjectFilesTest.cs
index 3f87217..77bf65b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ProjectFilesTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ProjectFilesTest.cs
@@ -17,9 +17,12 @@
namespace Apache.Ignite.Core.Tests.Examples
{
+ using System;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
+ using Newtonsoft.Json;
+ using Newtonsoft.Json.Serialization;
using NUnit.Framework;
/// <summary>
@@ -27,23 +30,147 @@ namespace Apache.Ignite.Core.Tests.Examples
/// </summary>
public class ProjectFilesTest
{
+ /** */
+ private const string WorkspaceFolder = "${workspaceFolder}";
+
+ /** */
+ private static readonly Example[] Examples = Example.AllExamples;
+
+ /** */
+ private static readonly string ExamplesSlnText = File.ReadAllText(ExamplePaths.SlnFile);
+
+ /** */
+ private static readonly string LaunchJsonText = File.ReadAllText(ExamplePaths.LaunchJsonFile);
+
+ /** */
+ private static readonly string[] ThickOnlyExamples = {
+ "NearCache", "DataStreamer", "MultiTieredCache", "QueryFullText", "Store", "EntryProcessor",
+ "TransactionDeadlockDetection", "Func", "PeerAssemblyLoading", "Task", "AtomicLong",
+ "AtomicReference", "AtomicSequence", "ClientReconnect", "Events", "Lifecycle", "Messaging"
+ };
+
+ /// <summary>
+ /// Checks csproj files.
+ /// </summary>
+ [Test, TestCaseSource(nameof(Examples))]
+ public void TestCsprojFiles(Example example)
+ {
+ Assert.IsTrue(File.Exists(example.ProjectFile), $"File.Exists({example.ProjectFile})");
+
+ var text = File.ReadAllText(example.ProjectFile);
+
+ StringAssert.Contains("<OutputType>Exe</OutputType>", text);
+ StringAssert.Contains("<TargetFramework>netcoreapp2.1</TargetFramework>", text);
+ StringAssert.Contains("<ProjectReference Include=\"..\\..\\..\\Shared\\Shared.csproj", text);
+ StringAssert.Contains($"{example.Name}.csproj", ExamplesSlnText);
+ StringAssert.Contains($"{example.Name}.dll", LaunchJsonText);
+
+ StringAssert.DoesNotContain("TODO", example.SourceCode);
+ StringAssert.DoesNotContain("STAThread", example.SourceCode);
+ StringAssert.Contains("public static class Program", example.SourceCode);
+ StringAssert.Contains("public static void Main()", example.SourceCode);
+
+ var expectedRootNamespace = example.ProjectFile
+ .Replace(ExamplePaths.SourcesPath, string.Empty)
+ .Replace(Path.DirectorySeparatorChar, '.')
+ .Replace("." + Path.GetFileName(example.ProjectFile), string.Empty);
+
+ StringAssert.Contains($"<RootNamespace>Apache.Ignite.Examples{expectedRootNamespace}</RootNamespace>", text);
+
+ if (!example.IsThin && !ThickOnlyExamples.Contains(example.Name))
+ {
+ var thinCounterpart = example.Name + "Thin";
+
+ Assert.IsTrue(
+ Examples.Any(e => e.Name == thinCounterpart),
+ $"Missing thin client example: {thinCounterpart}");
+ }
+ }
+
+ /// <summary>
+ /// Checks VS Code files.
+ /// </summary>
+ [Test]
+ public void TestVsCodeFiles()
+ {
+ var tasksText = File.ReadAllText(ExamplePaths.TasksJsonFile);
+ StringAssert.Contains(Path.GetFileName(ExamplePaths.SlnFile), tasksText);
+
+ var configsCount = Regex.Matches(LaunchJsonText, "\"name\":").Count;
+ var expectedCount = Example.AllExamples.Length + 1; // +1 for ServerNode project
+
+ Assert.AreEqual(expectedCount, configsCount);
+ }
+
/// <summary>
- /// Checks config files in examples comments for existence.
+ /// Updates launch.json with all examples.
+ /// <para />
+ /// Run this test to update the file when necessary.
+ /// This test is not won't be run automatically because of <see cref="ExplicitAttribute"/>.
/// </summary>
[Test]
- public void CheckConfigFilesExist()
+ [Explicit]
+ public void UpdateLaunchJson()
+ {
+ var launch = new Launch
+ {
+ Configurations = Example.AllProjects.Select(e => new LaunchConfig
+ {
+ Name = e.Name,
+ Program = e.AssemblyFile.Replace(ExamplePaths.SourcesPath, WorkspaceFolder),
+ Cwd = Path.GetDirectoryName(e.ProjectFile).Replace(ExamplePaths.SourcesPath, WorkspaceFolder)
+ }).ToArray()
+ };
+
+ var json = JsonConvert.SerializeObject(launch, Formatting.Indented, new JsonSerializerSettings
+ {
+ ContractResolver = new CamelCasePropertyNamesContractResolver()
+ });
+
+ File.WriteAllText(ExamplePaths.LaunchJsonFile, json);
+ }
+
+ // ReSharper disable UnusedMember.Local
+ // ReSharper disable UnusedAutoPropertyAccessor.Local
+ /** launch.json */
+ private class Launch
{
- var paths = Directory.GetFiles(PathUtil.ExamplesSourcePath, "*.cs", SearchOption.AllDirectories)
- .Select(File.ReadAllText)
- .SelectMany(src => Regex.Matches(src, @"platforms[^\s]+.config").OfType<Match>())
- .Where(match => match.Success)
- .Select(match => PathUtil.GetFullConfigPath(match.Value))
- .Distinct()
- .ToList();
+ /** */
+ public string Version { get; set; } = "0.2.0";
+
+ /** */
+ public LaunchConfig[] Configurations { get; set; }
+ }
+
+ /** launch.json configuration */
+ private class LaunchConfig
+ {
+ /** */
+ public string Name { get; set; }
+
+ /** */
+ public string Type { get; set; } = "coreclr";
+
+ /** */
+ public string Request { get; set; } = "launch";
+
+ /** */
+ public string PreLaunchTask { get; set; } = "build";
+
+ /** */
+ public string Program { get; set; } = "${workspaceFolder}/Thin/Cache/PutGet/bin/Debug/netcoreapp2.1/PutGet.dll";
+
+ /** */
+ public string[] Args { get; set; } = Array.Empty<string>();
+
+ /** */
+ public string Cwd { get; set; } = "${workspaceFolder}/Thin/Cache/PutGet";
- Assert.AreEqual(1, paths.Count);
+ /** */
+ public string Console { get; set; } = "externalTerminal"; // Or "integratedTerminal"
- paths.ForEach(path => Assert.IsTrue(File.Exists(path), "Config file does not exist: " + path));
+ /** */
+ public bool StopAtEntry { get; set; } = false;
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/PathUtil.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThickClientExamplesTest.cs
similarity index 53%
copy from modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/PathUtil.cs
copy to modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThickClientExamplesTest.cs
index d5c6604..d987e74 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/PathUtil.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThickClientExamplesTest.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -17,40 +17,47 @@
namespace Apache.Ignite.Core.Tests.Examples
{
- using System.IO;
+ using System.Linq;
+ using NUnit.Framework;
/// <summary>
- /// Grid path resolver.
+ /// Tests thick examples.
/// </summary>
- public static class PathUtil
+ [Category(TestUtils.CategoryExamples)]
+ public class ThickClientExamplesTest
{
/** */
- public const string DevPrefix = "modules\\";
-
- /** */
- public static readonly string IgniteHome = Impl.Common.IgniteHome.Resolve();
+ private static readonly Example[] ThickClientExamples = Example.AllExamples
+ .Where(e => e.IsClient)
+ .ToArray();
/// <summary>
- /// Examples source code path.
+ /// Sets up the fixture.
/// </summary>
- public static readonly string ExamplesSourcePath =
- Path.Combine(IgniteHome, "modules", "platforms", "dotnet", "examples");
+ [TestFixtureSetUp]
+ public void FixtureSetUp()
+ {
+ Ignition.Start(TestUtils.GetTestConfiguration(name: "server"));
+ }
/// <summary>
- /// Examples application configuration path.
+ /// Tears down the fixture.
/// </summary>
- public static readonly string ExamplesAppConfigPath =
- Path.Combine(ExamplesSourcePath, "Apache.Ignite.Examples", "App.config");
+ [TestFixtureTearDown]
+ public void FixtureTearDown()
+ {
+ Ignition.StopAll(true);
+ }
/// <summary>
- /// Gets the full configuration path.
+ /// Tests thick mode example.
/// </summary>
- public static string GetFullConfigPath(string springConfigUrl)
+ [Test, TestCaseSource(nameof(ThickClientExamples))]
+ public void TestThickExample(Example example)
{
- if (string.IsNullOrEmpty(springConfigUrl))
- return springConfigUrl;
+ Assert.IsFalse(example.IsThin);
- return Path.GetFullPath(Path.Combine(IgniteHome, DevPrefix + springConfigUrl));
+ example.Run();
}
}
}
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/PathUtil.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThickExamplesExternalNodeTest.cs
similarity index 53%
rename from modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/PathUtil.cs
rename to modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThickExamplesExternalNodeTest.cs
index d5c6604..6dbf4d2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/PathUtil.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThickExamplesExternalNodeTest.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -17,40 +17,45 @@
namespace Apache.Ignite.Core.Tests.Examples
{
- using System.IO;
+ using System.Linq;
+ using NUnit.Framework;
/// <summary>
- /// Grid path resolver.
+ /// Tests thick examples.
/// </summary>
- public static class PathUtil
+ [Category(TestUtils.CategoryExamples)]
+ public class ThickExamplesExternalNodeTest
{
/** */
- public const string DevPrefix = "modules\\";
-
- /** */
- public static readonly string IgniteHome = Impl.Common.IgniteHome.Resolve();
+ private static readonly Example[] ThickExamples = Example.AllExamples
+ .Where(e => !e.IsThin && !e.IsClient && !e.DisallowsExternalNode)
+ .ToArray();
/// <summary>
- /// Examples source code path.
+ /// Sets up the fixture.
/// </summary>
- public static readonly string ExamplesSourcePath =
- Path.Combine(IgniteHome, "modules", "platforms", "dotnet", "examples");
+ [TestFixtureSetUp]
+ public void FixtureSetUp()
+ {
+ Ignition.Start(TestUtils.GetTestConfiguration(name: "server"));
+ }
/// <summary>
- /// Examples application configuration path.
+ /// Tears down the fixture.
/// </summary>
- public static readonly string ExamplesAppConfigPath =
- Path.Combine(ExamplesSourcePath, "Apache.Ignite.Examples", "App.config");
+ [TestFixtureTearDown]
+ public void FixtureTearDown()
+ {
+ Ignition.StopAll(true);
+ }
/// <summary>
- /// Gets the full configuration path.
+ /// Tests thick mode example.
/// </summary>
- public static string GetFullConfigPath(string springConfigUrl)
+ [Test, TestCaseSource(nameof(ThickExamples))]
+ public void TestThickExampleWithExternalNode(Example example)
{
- if (string.IsNullOrEmpty(springConfigUrl))
- return springConfigUrl;
-
- return Path.GetFullPath(Path.Combine(IgniteHome, DevPrefix + springConfigUrl));
+ example.Run();
}
}
}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStoreFactory.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThickExamplesTest.cs
similarity index 60%
copy from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStoreFactory.cs
copy to modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThickExamplesTest.cs
index 643fc44..7cbd2f2 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStoreFactory.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThickExamplesTest.cs
@@ -15,24 +15,31 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Datagrid
+namespace Apache.Ignite.Core.Tests.Examples
{
- using System;
- using Apache.Ignite.Core.Cache.Store;
- using Apache.Ignite.Core.Common;
+ using System.Linq;
+ using NUnit.Framework;
/// <summary>
- /// Employee store factory.
+ /// Tests thick examples.
/// </summary>
- [Serializable]
- public class EmployeeStoreFactory : IFactory<ICacheStore>
+ [Category(TestUtils.CategoryExamples)]
+ public class ThickExamplesTest
{
+ /** */
+ private static readonly Example[] ThickExamples = Example.AllExamples
+ .Where(e => !e.IsThin && !e.IsClient && !e.RequiresExternalNode)
+ .ToArray();
+
/// <summary>
- /// Creates an instance of the cache store.
+ /// Tests thick mode example.
/// </summary>
- public ICacheStore CreateInstance()
+ [Test, TestCaseSource(nameof(ThickExamples))]
+ public void TestThickExample(Example example)
{
- return new EmployeeStore();
+ Assert.IsFalse(example.IsThin);
+
+ example.Run();
}
}
}
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThinExamplesTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThinExamplesTest.cs
new file mode 100644
index 0000000..6b42a18
--- /dev/null
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ThinExamplesTest.cs
@@ -0,0 +1,80 @@
+/*
+ * 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.Tests.Examples
+{
+ using System.IO;
+ using System.Linq;
+ using System.Reflection;
+ using NUnit.Framework;
+
+ /// <summary>
+ /// Tests thin client example
+ /// </summary>
+ [Category(TestUtils.CategoryExamples)]
+ public class ThinExamplesTest
+ {
+ /** */
+ private static readonly Example[] ThinExamples = Example.AllExamples.Where(e => e.IsThin).ToArray();
+
+ /// <summary>
+ /// Sets up the fixture.
+ /// </summary>
+ [TestFixtureSetUp]
+ public void FixtureSetUp()
+ {
+ var ignite = Ignition.Start(TestUtils.GetTestConfiguration());
+
+ // Init default services.
+ var sharedProj = Directory.GetFiles(ExamplePaths.SourcesPath, "*.csproj", SearchOption.AllDirectories)
+ .Single(x => x.EndsWith("Shared.csproj"));
+
+ var asmFile = Path.Combine(Path.GetDirectoryName(sharedProj), "bin", "Debug", "netcoreapp2.1", "Shared.dll");
+ var asm = Assembly.LoadFrom(asmFile);
+ var utils = asm.GetType("Apache.Ignite.Examples.Shared.Utils");
+
+ Assert.IsNotNull(utils);
+
+ utils.InvokeMember(
+ "DeployDefaultServices",
+ BindingFlags.Static | BindingFlags.Public | BindingFlags.InvokeMethod,
+ null,
+ null,
+ new object[] {ignite});
+ }
+
+ /// <summary>
+ /// Tears down the fixture.
+ /// </summary>
+ [TestFixtureTearDown]
+ public void FixtureTearDown()
+ {
+ Ignition.StopAll(true);
+ }
+
+ /// <summary>
+ /// Tests the thin client example
+ /// </summary>
+ [Test, TestCaseSource(nameof(ThinExamples))]
+ public void TestThinExample(Example example)
+ {
+ Assert.IsTrue(example.IsThin);
+
+ example.Run();
+ }
+ }
+}
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ProjectFilesTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ProjectFilesTest.cs
index 1a7625c..50d1fd9 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ProjectFilesTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ProjectFilesTest.cs
@@ -37,7 +37,10 @@ namespace Apache.Ignite.Core.Tests
{
var projFiles = TestUtils.GetDotNetSourceDir()
.GetFiles("*.csproj", SearchOption.AllDirectories)
- .Where(x => !x.FullName.ToLower().Contains("dotnetcore") && !x.FullName.Contains("Benchmark"))
+ .Where(x => !x.FullName.ToLower().Contains("dotnetcore") &&
+ !x.FullName.Contains("Benchmark") &&
+ !x.FullName.Contains("templates") &&
+ !x.FullName.Contains("examples"))
.ToArray();
Assert.GreaterOrEqual(projFiles.Length, 7);
@@ -92,8 +95,11 @@ namespace Apache.Ignite.Core.Tests
public void TestAllCsharpFilesAreIncludedInProject()
{
var projFiles = TestUtils.GetDotNetSourceDir().GetFiles("*.csproj", SearchOption.AllDirectories)
- .Where(x =>
- !x.Name.Contains("DotNetCore") && !x.Name.Contains("Benchmark") && !x.Name.Contains("Examples"));
+ .Where(x =>
+ !x.Name.Contains("DotNetCore") &&
+ !x.Name.Contains("Benchmark") &&
+ !x.FullName.Contains("templates") &&
+ !x.FullName.Contains("examples"));
var excludedFiles = new[]
{
@@ -121,6 +127,7 @@ namespace Apache.Ignite.Core.Tests
if (csFileRelativePath.StartsWith("bin\\") ||
csFileRelativePath.StartsWith("obj\\") ||
csFileRelativePath.Contains("DotNetCore") ||
+ csFileRelativePath.Contains("Examples") ||
excludedFiles.Contains(csFileRelativePath))
{
continue;
@@ -128,8 +135,7 @@ namespace Apache.Ignite.Core.Tests
Assert.IsTrue(
projFileText.Contains(csFileRelativePath),
- string.Format("Project file '{0}' should contain file '{1}'", projFile.Name,
- csFileRelativePath));
+ string.Format("Project file '{0}' should contain file '{1}'", projFile.Name, csFile));
}
}
});
@@ -144,7 +150,8 @@ namespace Apache.Ignite.Core.Tests
return TestUtils.GetDotNetSourceDir().GetFiles("*.csproj", SearchOption.AllDirectories)
.Where(x => x.Name != "Apache.Ignite.csproj" &&
!x.Name.Contains("Test") &&
- !x.Name.Contains("Example") &&
+ !x.FullName.Contains("examples") &&
+ !x.FullName.Contains("templates") &&
!x.Name.Contains("DotNetCore") &&
!x.Name.Contains("Benchmark"));
}
@@ -164,8 +171,10 @@ namespace Apache.Ignite.Core.Tests
[Test]
public void TestSlnToolsVersion()
{
- var slnFiles = TestUtils.GetDotNetSourceDir().GetFiles("*.sln", SearchOption.AllDirectories)
- .Where(x => !x.Name.Contains("DotNetCore")).ToArray();
+ var slnFiles = TestUtils.GetDotNetSourceDir()
+ .GetFiles("*.sln", SearchOption.AllDirectories)
+ .Where(x => !x.Name.Contains("DotNetCore") && !x.Name.Contains("Examples"))
+ .ToArray();
Assert.GreaterOrEqual(slnFiles.Length, 2);
CheckFiles(slnFiles, x => !x.Contains("# Visual Studio 2010") ||
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/TypeResolver.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/TypeResolver.cs
index 38b17a1..b0c5206 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/TypeResolver.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/TypeResolver.cs
@@ -69,7 +69,7 @@ namespace Apache.Ignite.Core.Impl.Binary
/// <param name="assemblies">Assemblies to look in.</param>
/// <param name="nameMapper">The name mapper.</param>
/// <returns>
- /// Resolved type.
+ /// Resolved type.
/// </returns>
private static Type ResolveType(string assemblyName, TypeNameParser typeName, ICollection<Assembly> assemblies,
IBinaryNameMapper nameMapper)
@@ -267,6 +267,11 @@ namespace Apache.Ignite.Core.Impl.Binary
/// </summary>
private static Type FindType(Assembly asm, string typeName, IBinaryNameMapper mapper)
{
+ if (asm.IsDynamic)
+ {
+ return null;
+ }
+
if (mapper == null)
{
return asm.GetType(typeName);
@@ -291,4 +296,4 @@ namespace Apache.Ignite.Core.Impl.Binary
}
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/platforms/dotnet/Apache.Ignite.sln b/modules/platforms/dotnet/Apache.Ignite.sln
index 1e4cd10..790d66a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.sln
+++ b/modules/platforms/dotnet/Apache.Ignite.sln
@@ -9,17 +9,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite.Core.Tests.Te
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite", "Apache.Ignite\Apache.Ignite.csproj", "{27F7F3C6-BDDE-43A9-B565-856F8395A04B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite.Examples", "examples\Apache.Ignite.Examples\Apache.Ignite.Examples.csproj", "{069FA680-3C4D-43A9-B84F-E67513B87827}"
- ProjectSection(ProjectDependencies) = postProject
- {4CD2F726-7E2B-46C4-A5BA-057BB82EECB6} = {4CD2F726-7E2B-46C4-A5BA-057BB82EECB6}
- {5B571661-17F4-4F29-8C7D-0EDB38CA9B55} = {5B571661-17F4-4F29-8C7D-0EDB38CA9B55}
- EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite.ExamplesDll", "examples\Apache.Ignite.ExamplesDll\Apache.Ignite.ExamplesDll.csproj", "{DFB08363-202E-412D-8812-349EF10A8702}"
- ProjectSection(ProjectDependencies) = postProject
- {27F7F3C6-BDDE-43A9-B565-856F8395A04B} = {27F7F3C6-BDDE-43A9-B565-856F8395A04B}
- EndProjectSection
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite.Benchmarks", "Apache.Ignite.Benchmarks\Apache.Ignite.Benchmarks.csproj", "{8F507DBE-56F9-437F-82D4-74C02EC44E41}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E0784F76-949C-456E-A529-A55D0E389165}"
@@ -48,6 +37,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite.EntityFramewo
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite.EntityFramework.Tests", "Apache.Ignite.EntityFramework.Tests\Apache.Ignite.EntityFramework.Tests.csproj", "{CDA5700E-78F3-4A9E-A9B0-704CBE94651C}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite.Core.Tests.TestDll2", "Apache.Ignite.Core.Tests.TestDll2\Apache.Ignite.Core.Tests.TestDll2.csproj", "{4D8DDA6D-4616-4DF1-A2DA-22FB3A5EC817}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -66,18 +57,14 @@ Global
{F4A69E2D-908E-4F0F-A794-84D508D60E5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F4A69E2D-908E-4F0F-A794-84D508D60E5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F4A69E2D-908E-4F0F-A794-84D508D60E5F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4D8DDA6D-4616-4DF1-A2DA-22FB3A5EC817}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4D8DDA6D-4616-4DF1-A2DA-22FB3A5EC817}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4D8DDA6D-4616-4DF1-A2DA-22FB3A5EC817}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4D8DDA6D-4616-4DF1-A2DA-22FB3A5EC817}.Release|Any CPU.Build.0 = Release|Any CPU
{27F7F3C6-BDDE-43A9-B565-856F8395A04B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{27F7F3C6-BDDE-43A9-B565-856F8395A04B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27F7F3C6-BDDE-43A9-B565-856F8395A04B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27F7F3C6-BDDE-43A9-B565-856F8395A04B}.Release|Any CPU.Build.0 = Release|Any CPU
- {069FA680-3C4D-43A9-B84F-E67513B87827}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {069FA680-3C4D-43A9-B84F-E67513B87827}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {069FA680-3C4D-43A9-B84F-E67513B87827}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {069FA680-3C4D-43A9-B84F-E67513B87827}.Release|Any CPU.Build.0 = Release|Any CPU
- {DFB08363-202E-412D-8812-349EF10A8702}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DFB08363-202E-412D-8812-349EF10A8702}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DFB08363-202E-412D-8812-349EF10A8702}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DFB08363-202E-412D-8812-349EF10A8702}.Release|Any CPU.Build.0 = Release|Any CPU
{8F507DBE-56F9-437F-82D4-74C02EC44E41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8F507DBE-56F9-437F-82D4-74C02EC44E41}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F507DBE-56F9-437F-82D4-74C02EC44E41}.Release|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/modules/platforms/dotnet/build.ps1 b/modules/platforms/dotnet/build.ps1
index 88a6d78..cde1544 100644
--- a/modules/platforms/dotnet/build.ps1
+++ b/modules/platforms/dotnet/build.ps1
@@ -45,6 +45,9 @@ Skip NuGet packaging.
.PARAMETER skipCodeAnalysis
Skip code analysis.
+.PARAMETER skipExamples
+Skip examples build.
+
.PARAMETER clean
Perform a clean rebuild.
@@ -70,7 +73,7 @@ Path to nuget.exe.
NuGet version override (normally inferred from assembly version).
.EXAMPLE
-.\build.ps1 -clean
+.\build.ps1 -clean
# Full rebuild of Java, .NET and NuGet packages.
.EXAMPLE
@@ -84,7 +87,8 @@ param (
[switch]$skipDotNet,
[switch]$skipDotNetCore,
[switch]$skipNuGet,
- [switch]$skipCodeAnalysis,
+ [switch]$skipCodeAnalysis,
+ [switch]$skipExamples,
[switch]$clean,
[ValidateSet("Any CPU", "x64", "x86")]
[string]$platform="Any CPU",
@@ -117,8 +121,8 @@ function Exec([string]$command) {
# Detect Ignite root directory
cd $PSScriptRoot\..
-while (!((Test-Path bin) -and (Test-Path examples) -and ((Test-Path modules) -or (Test-Path platforms)))) {
- cd ..
+while (!((Test-Path bin) -and (Test-Path examples) -and ((Test-Path modules) -or (Test-Path platforms)))) {
+ cd ..
if ((Get-Location).Drive.Root -eq (Get-Location).Path) {
break
}
@@ -129,7 +133,7 @@ echo "Ignite home detected at '$pwd'."
if (!$skipJava) {
# Detect Maven
$mv = "mvn"
- if ((Get-Command $mv -ErrorAction SilentlyContinue) -eq $null) {
+ if ((Get-Command $mv -ErrorAction SilentlyContinue) -eq $null) {
$mvHome = ($env:MAVEN_HOME, $env:M2_HOME, $env:M3_HOME, $env:MVN_HOME -ne $null)[0]
if ($mvHome -eq $null) {
@@ -147,7 +151,7 @@ if (!$skipJava) {
# Run Maven
echo "Starting Java (Maven) build..."
-
+
$mvnTargets = if ($clean) { "clean package" } else { "package" }
Exec "$mv --% $mvnTargets -DskipTests $mavenOpts"
}
@@ -164,27 +168,28 @@ Get-ChildItem $jarDirs.Split(',') *.jar -recurse `
-exclude "*-sources*","*-javadoc*","*-tests*" `
| ? { $_.FullName -inotmatch '[\\/]optional[\\/]' } `
| % { Copy-Item -Force $_ $libsDir }
-
+
# Restore directory
cd $PSScriptRoot
# 2) Build .NET
+if ((!$skipDotNet) -and (!$skipNuGet)) {
+ # Detect NuGet
+ $ng = if ($nugetPath) { $nugetPath } else { "nuget" }
-# Detect NuGet
-$ng = if ($nugetPath) { $nugetPath } else { "nuget" }
+ if ((Get-Command $ng -ErrorAction SilentlyContinue) -eq $null) {
+ $ng = If ($IsLinux) { "mono $PSScriptRoot/nuget.exe" } else { "$PSScriptRoot\nuget.exe" }
-if ((Get-Command $ng -ErrorAction SilentlyContinue) -eq $null) {
- $ng = If ($IsLinux) { "mono $PSScriptRoot/nuget.exe" } else { "$PSScriptRoot\nuget.exe" }
+ if (-not (Test-Path $ng)) {
+ echo "Downloading NuGet..."
+ (New-Object System.Net.WebClient).DownloadFile("https://dist.nuget.org/win-x86-commandline/v5.3.1/nuget.exe", "$PSScriptRoot/nuget.exe")
+ }
+ }
- if (-not (Test-Path $ng)) {
- echo "Downloading NuGet..."
- (New-Object System.Net.WebClient).DownloadFile("https://dist.nuget.org/win-x86-commandline/v5.3.1/nuget.exe", "$PSScriptRoot/nuget.exe")
- }
+ echo "Using NuGet from: $ng"
}
-echo "Using NuGet from: $ng"
-
if (!$skipDotNet) {
$msBuild = "msbuild"
@@ -208,7 +213,7 @@ if (!$skipDotNet) {
$msBuild = (Join-Path -path (Get-ItemProperty $regKey)."MSBuildToolsPath" -childpath "msbuild.exe")
$msBuild = "`"$msBuild`"" # Put in quotes and escape to handle whitespace in path
}
-
+
echo "MSBuild detected at '$msBuild'."
# Restore NuGet packages
@@ -220,11 +225,11 @@ if (!$skipDotNet) {
$codeAnalysis = if ($skipCodeAnalysis) {"/p:RunCodeAnalysis=false"} else {""}
$msBuildCommand = "$msBuild Apache.Ignite.sln /target:$targets /p:Configuration=$configuration /p:Platform=`"$platform`" $codeAnalysis /p:UseSharedCompilation=false"
echo "Starting MsBuild: '$msBuildCommand'"
- Exec $msBuildCommand
+ Exec $msBuildCommand
}
if(!$skipDotNetCore) {
-
+
# Build core
$targetSolution = ".\Apache.Ignite\Apache.Ignite.DotNetCore.csproj"
if ($clean) {
@@ -235,7 +240,7 @@ if(!$skipDotNetCore) {
$publishCommand = "dotnet publish $targetSolution -c $configuration"
echo "Starting dotnet publish: '$publishCommand'"
- Exec $publishCommand
+ Exec $publishCommand
}
if ($asmDirs) {
@@ -254,7 +259,7 @@ if ($asmDirs) {
echo "Copying '$_' to '$target'"
Copy-Item -Force $_.FullName $target
}
- }
+ }
}
# Copy binaries
@@ -264,10 +269,15 @@ Get-ChildItem *.csproj -Recurse | where Name -NotLike "*Examples*" `
| where Name -NotLike "*Tests*" `
| where Name -NotLike "*DotNetCore*" `
| where Name -NotLike "*Benchmark*" | % {
- $projDir = split-path -parent $_.FullName
- $dir = [IO.Path]::Combine($projDir, "bin", $configuration, "*")
- echo "Copying files to bin from '$dir'"
- Copy-Item -Force -Recurse $dir bin
+ $projDir = split-path -parent $_.FullName
+ $dir = [IO.Path]::Combine($projDir, "bin", $configuration)
+
+ if ([IO.Directory]::Exists($dir)) {
+ echo "Copying files to bin from '$dir'"
+
+ $dirAll = [IO.Path]::Combine($dir, "*")
+ Copy-Item -Force -Recurse $dirAll bin
+ }
}
@@ -287,9 +297,26 @@ if (!$skipNuGet) {
# Find all nuspec files and run 'nuget pack' either directly, or on corresponding csproj files (if present)
Get-ChildItem *.nuspec -Recurse `
- | % {
+ | % {
Exec "$ng pack $_ -Prop Configuration=Release -Prop Platform=AnyCPU -Version $ver -OutputDirectory $nupkgDir"
}
echo "NuGet packages created in '$pwd\$nupkgDir'."
}
+
+# 4) Build Examples
+if ((!$skipDotNetCore) -and (!$skipExamples)) {
+ Exec "dotnet build .\examples\Apache.Ignite.Examples.sln"
+
+ if (!$skipNuGet) {
+ # Copy csproj to current dir temporarily: dotnet-new templates can't be packed with parent dir content.
+ Copy-Item .\templates\public\Apache.Ignite.Examples\Apache.Ignite.Examples.csproj $pwd
+
+ Exec "dotnet pack Apache.Ignite.Examples.csproj --output $nupkgDir -p:PackageVersion=$ver"
+
+ Remove-Item Apache.Ignite.Examples.csproj
+
+ echo "Examples template NuGet package created in '$pwd\$nupkgDir'."
+ }
+}
+
diff --git a/modules/platforms/dotnet/examples/.template.config/template.json b/modules/platforms/dotnet/examples/.template.config/template.json
new file mode 100644
index 0000000..adadef7
--- /dev/null
+++ b/modules/platforms/dotnet/examples/.template.config/template.json
@@ -0,0 +1,17 @@
+{
+ "$schema": "http://json.schemastore.org/template",
+ "author": "Apache Ignite",
+ "classifications": [
+ "Apache Ignite",
+ "Console",
+ "Examples"
+ ],
+ "identity": "Apache.Ignite.Examples",
+ "name": "Apache Ignite Examples",
+ "shortName": "ignite-examples",
+ "preferNameDirectory": true,
+ "tags": {
+ "language": "C#",
+ "type": "project"
+ }
+}
diff --git a/modules/platforms/dotnet/examples/.vscode/launch.json b/modules/platforms/dotnet/examples/.vscode/launch.json
new file mode 100644
index 0000000..afb0f52
--- /dev/null
+++ b/modules/platforms/dotnet/examples/.vscode/launch.json
@@ -0,0 +1,445 @@
+{
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "AtomicLong",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/DataStructures/AtomicLong/bin/Debug/netcoreapp2.1/AtomicLong.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/DataStructures/AtomicLong",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "AtomicReference",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/DataStructures/AtomicReference/bin/Debug/netcoreapp2.1/AtomicReference.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/DataStructures/AtomicReference",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "AtomicSequence",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/DataStructures/AtomicSequence/bin/Debug/netcoreapp2.1/AtomicSequence.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/DataStructures/AtomicSequence",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "BinaryMode",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Cache/BinaryMode/bin/Debug/netcoreapp2.1/BinaryMode.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Cache/BinaryMode",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "BinaryModeThin",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thin/Cache/BinaryModeThin/bin/Debug/netcoreapp2.1/BinaryModeThin.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thin/Cache/BinaryModeThin",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "ClientReconnect",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Misc/ClientReconnect/bin/Debug/netcoreapp2.1/ClientReconnect.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Misc/ClientReconnect",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "DataStreamer",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Cache/DataStreamer/bin/Debug/netcoreapp2.1/DataStreamer.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Cache/DataStreamer",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "Ddl",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Sql/Ddl/bin/Debug/netcoreapp2.1/Ddl.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Sql/Ddl",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "DdlThin",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thin/Sql/DdlThin/bin/Debug/netcoreapp2.1/DdlThin.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thin/Sql/DdlThin",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "Dml",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Sql/Dml/bin/Debug/netcoreapp2.1/Dml.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Sql/Dml",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "DmlThin",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thin/Sql/DmlThin/bin/Debug/netcoreapp2.1/DmlThin.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thin/Sql/DmlThin",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "EntryProcessor",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Cache/EntryProcessor/bin/Debug/netcoreapp2.1/EntryProcessor.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Cache/EntryProcessor",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "Events",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Misc/Events/bin/Debug/netcoreapp2.1/Events.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Misc/Events",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "Func",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Compute/Func/bin/Debug/netcoreapp2.1/Func.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Compute/Func",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "Lifecycle",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Misc/Lifecycle/bin/Debug/netcoreapp2.1/Lifecycle.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Misc/Lifecycle",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "Linq",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Sql/Linq/bin/Debug/netcoreapp2.1/Linq.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Sql/Linq",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "LinqThin",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thin/Sql/LinqThin/bin/Debug/netcoreapp2.1/LinqThin.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thin/Sql/LinqThin",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "Messaging",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Misc/Messaging/bin/Debug/netcoreapp2.1/Messaging.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Misc/Messaging",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "MultiTieredCache",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Cache/MultiTieredCache/bin/Debug/netcoreapp2.1/MultiTieredCache.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Cache/MultiTieredCache",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "NearCache",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Cache/NearCache/bin/Debug/netcoreapp2.1/NearCache.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Cache/NearCache",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "OptimisticTransaction",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Cache/OptimisticTransaction/bin/Debug/netcoreapp2.1/OptimisticTransaction.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Cache/OptimisticTransaction",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "OptimisticTransactionThin",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thin/Cache/OptimisticTransactionThin/bin/Debug/netcoreapp2.1/OptimisticTransactionThin.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thin/Cache/OptimisticTransactionThin",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "PeerAssemblyLoading",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Compute/PeerAssemblyLoading/bin/Debug/netcoreapp2.1/PeerAssemblyLoading.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Compute/PeerAssemblyLoading",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "PutGet",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Cache/PutGet/bin/Debug/netcoreapp2.1/PutGet.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Cache/PutGet",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "PutGetThin",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thin/Cache/PutGetThin/bin/Debug/netcoreapp2.1/PutGetThin.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thin/Cache/PutGetThin",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "QueryContinuous",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Cache/QueryContinuous/bin/Debug/netcoreapp2.1/QueryContinuous.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Cache/QueryContinuous",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "QueryContinuousThin",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thin/Cache/QueryContinuousThin/bin/Debug/netcoreapp2.1/QueryContinuousThin.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thin/Cache/QueryContinuousThin",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "QueryFullText",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Cache/QueryFullText/bin/Debug/netcoreapp2.1/QueryFullText.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Cache/QueryFullText",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "QueryScan",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Cache/QueryScan/bin/Debug/netcoreapp2.1/QueryScan.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Cache/QueryScan",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "QueryScanThin",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thin/Cache/QueryScanThin/bin/Debug/netcoreapp2.1/QueryScanThin.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thin/Cache/QueryScanThin",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "ServerNode",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/ServerNode/bin/Debug/netcoreapp2.1/ServerNode.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/ServerNode",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "Services",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Misc/Services/bin/Debug/netcoreapp2.1/Services.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Misc/Services",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "ServicesThin",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thin/Misc/ServicesThin/bin/Debug/netcoreapp2.1/ServicesThin.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thin/Misc/ServicesThin",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "Sql",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Sql/Sql/bin/Debug/netcoreapp2.1/Sql.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Sql/Sql",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "SqlThin",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thin/Sql/SqlThin/bin/Debug/netcoreapp2.1/SqlThin.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thin/Sql/SqlThin",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "Store",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Cache/Store/bin/Debug/netcoreapp2.1/Store.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Cache/Store",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "Task",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Compute/Task/bin/Debug/netcoreapp2.1/Task.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Compute/Task",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "Transaction",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Cache/Transaction/bin/Debug/netcoreapp2.1/Transaction.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Cache/Transaction",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "TransactionDeadlockDetection",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thick/Cache/TransactionDeadlockDetection/bin/Debug/netcoreapp2.1/TransactionDeadlockDetection.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thick/Cache/TransactionDeadlockDetection",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ },
+ {
+ "name": "TransactionThin",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceFolder}/Thin/Cache/TransactionThin/bin/Debug/netcoreapp2.1/TransactionThin.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Thin/Cache/TransactionThin",
+ "console": "externalTerminal",
+ "stopAtEntry": false
+ }
+ ]
+}
\ No newline at end of file
diff --git a/modules/platforms/dotnet/examples/.vscode/tasks.json b/modules/platforms/dotnet/examples/.vscode/tasks.json
new file mode 100644
index 0000000..3306796
--- /dev/null
+++ b/modules/platforms/dotnet/examples/.vscode/tasks.json
@@ -0,0 +1,17 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/Apache.Ignite.Examples.sln",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ }
+ ]
+}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples.sln b/modules/platforms/dotnet/examples/Apache.Ignite.Examples.sln
index c88d698..1fa4088 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples.sln
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples.sln
@@ -1,26 +1,663 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite.Examples", "Apache.Ignite.Examples\Apache.Ignite.Examples.csproj", "{069FA680-3C4D-43A9-B84F-E67513B87827}"
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26124.0
+MinimumVisualStudioVersion = 15.0.26124.0
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Thin", "Thin", "{886F8F3F-C769-49C0-8BED-AA20B7B43A5D}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite.ExamplesDll", "Apache.Ignite.ExamplesDll\Apache.Ignite.ExamplesDll.csproj", "{DFB08363-202E-412D-8812-349EF10A8702}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Cache", "Cache", "{065AC9B6-519D-488D-8C05-4CFAF47C0975}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PutGetThin", "Thin\Cache\PutGetThin\PutGetThin.csproj", "{D40C6568-1803-4934-9AE4-F4B8E96EBA90}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerNode", "ServerNode\ServerNode.csproj", "{D84AFE4B-C016-4082-983B-EE79D69C87FC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared", "Shared\Shared.csproj", "{4D4CB21E-49D9-4AFA-8321-EA1F00EB01F0}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Thick", "Thick", "{AEAD9D9F-2162-40F0-9380-4AA066192998}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Cache", "Cache", "{FD3102F2-CB16-4EDC-8C53-78CD34F43F5C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PutGet", "Thick\Cache\PutGet\PutGet.csproj", "{B395CABC-BF04-467E-80A0-6E7837688FFF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BinaryMode", "Thick\Cache\BinaryMode\BinaryMode.csproj", "{165F8B1C-97F3-4779-B2AD-035C6E53E085}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BinaryModeThin", "Thin\Cache\BinaryModeThin\BinaryModeThin.csproj", "{9C4D6CCF-D959-43C1-9EDC-E6D5B4EC5356}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QueryContinuous", "Thick\Cache\QueryContinuous\QueryContinuous.csproj", "{A030D742-2BD1-4A5C-8F5A-D0E872AE5946}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QueryScan", "Thick\Cache\QueryScan\QueryScan.csproj", "{90C58F79-9136-4E1C-9CF6-80C0A58468DB}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QueryFullText", "Thick\Cache\QueryFullText\QueryFullText.csproj", "{07086DCE-DE16-45A7-B04C-ED6B0737CE6B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EntryProcessor", "Thick\Cache\EntryProcessor\EntryProcessor.csproj", "{8460364F-0F95-4F76-AAF3-20BD120E95E1}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultiTieredCache", "Thick\Cache\MultiTieredCache\MultiTieredCache.csproj", "{54FFB523-A37C-4520-8FF8-9A8DEE8528BF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NearCache", "Thick\Cache\NearCache\NearCache.csproj", "{4DAFD379-D4DB-4FA4-BDF0-CDEEF2F40670}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Store", "Thick\Cache\Store\Store.csproj", "{D1D24CD0-6EAF-48B7-99D4-8F993CC9ED3C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataStreamer", "Thick\Cache\DataStreamer\DataStreamer.csproj", "{BC11EDEE-4684-4910-A2FB-1545153C918F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransactionDeadlockDetection", "Thick\Cache\TransactionDeadlockDetection\TransactionDeadlockDetection.csproj", "{5900AA9F-1EE9-4BB4-ADCD-EFDB13F5B869}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OptimisticTransaction", "Thick\Cache\OptimisticTransaction\OptimisticTransaction.csproj", "{1CF77DCF-2C6D-4E25-89C5-74EB32486A89}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Transaction", "Thick\Cache\Transaction\Transaction.csproj", "{42C7D8FD-2AF1-4E49-9EDE-EBAE15E149C9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OptimisticTransactionThin", "Thin\Cache\OptimisticTransactionThin\OptimisticTransactionThin.csproj", "{3F8CF55E-4138-483D-ABBF-917E6095FB14}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QueryContinuousThin", "Thin\Cache\QueryContinuousThin\QueryContinuousThin.csproj", "{85686C3E-0DD7-4CB7-98AD-B76C10B7C414}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QueryScanThin", "Thin\Cache\QueryScanThin\QueryScanThin.csproj", "{43F04C6D-1022-4D29-8B37-8473FE06E62E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransactionThin", "Thin\Cache\TransactionThin\TransactionThin.csproj", "{751FA84E-2689-4C09-838A-0CBC6F297249}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Compute", "Compute", "{476CF811-592F-44DA-9C86-6FB03F86862A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Func", "Thick\Compute\Func\Func.csproj", "{212BEA83-8F25-411D-AD69-314038A9DC9C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Task", "Thick\Compute\Task\Task.csproj", "{8CFFF7A2-464E-41B6-A35B-1E9A31C14DBF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PeerAssemblyLoading", "Thick\Compute\PeerAssemblyLoading\PeerAssemblyLoading.csproj", "{153E1917-3876-4BA3-89EA-A6D24844E64E}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataStructures", "DataStructures", "{D556DEC3-E54F-4E85-990B-9A22638A8872}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomicLong", "Thick\DataStructures\AtomicLong\AtomicLong.csproj", "{A92CD1D6-C53E-46FF-918C-3CD8A612B0FF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomicReference", "Thick\DataStructures\AtomicReference\AtomicReference.csproj", "{2544A001-8E77-4498-8192-A3FE224CC5AA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomicSequence", "Thick\DataStructures\AtomicSequence\AtomicSequence.csproj", "{B1486BF3-05E8-4445-9C39-D9064DD61B98}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{C4FAAB8B-3F85-4E58-B6ED-79CBD33142AE}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Events", "Thick\Misc\Events\Events.csproj", "{6641EED9-6A71-4AA0-9F95-762040C2232E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messaging", "Thick\Misc\Messaging\Messaging.csproj", "{484180F0-F859-4A03-853B-3B205173A0D7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientReconnect", "Thick\Misc\ClientReconnect\ClientReconnect.csproj", "{E5C6C42B-B085-4841-A7E6-CE9CE8B86399}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lifecycle", "Thick\Misc\Lifecycle\Lifecycle.csproj", "{C3662BE1-F669-4AF4-8880-BA0C0AB8BF75}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Services", "Thick\Misc\Services\Services.csproj", "{356BEED8-6291-4464-8991-19E9FAD2E262}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{20FBB84F-8A6F-4D51-B3EA-F20AE49942CE}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServicesThin", "Thin\Misc\ServicesThin\ServicesThin.csproj", "{E48EC44D-1793-4DD3-9931-A388EFC3B105}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sql", "Sql", "{FAEFE545-7021-47B2-B8F4-A4D90E3A1D95}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Linq", "Thick\Sql\Linq\Linq.csproj", "{6ACF7BC9-233E-43D6-A11C-65E86B635E69}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sql", "Sql", "{DEE13036-D4A0-4AA8-BA32-DBA07EA395C2}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinqThin", "Thin\Sql\LinqThin\LinqThin.csproj", "{5DA60E85-6262-4A5D-BC25-02F0F00B45D0}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sql", "Thick\Sql\Sql\Sql.csproj", "{E2711373-5BF2-4FC2-8B44-2029B8596545}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlThin", "Thin\Sql\SqlThin\SqlThin.csproj", "{4AE6C11F-4C2E-438D-845D-AD49755B4BED}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ddl", "Thick\Sql\Ddl\Ddl.csproj", "{7FF8F30E-BC11-4ADD-815E-C08998B9E831}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dml", "Thick\Sql\Dml\Dml.csproj", "{BD89BAE0-54E8-4B9E-81CC-A030B61FC157}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DmlThin", "Thin\Sql\DmlThin\DmlThin.csproj", "{A4F689F6-9C1C-48D9-9A93-101BCA7328D4}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DdlThin", "Thin\Sql\DdlThin\DdlThin.csproj", "{63ED1620-2FFF-42D5-BDA6-CC18FBAFEF1D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {069FA680-3C4D-43A9-B84F-E67513B87827}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {069FA680-3C4D-43A9-B84F-E67513B87827}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {069FA680-3C4D-43A9-B84F-E67513B87827}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {069FA680-3C4D-43A9-B84F-E67513B87827}.Release|Any CPU.Build.0 = Release|Any CPU
- {DFB08363-202E-412D-8812-349EF10A8702}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DFB08363-202E-412D-8812-349EF10A8702}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DFB08363-202E-412D-8812-349EF10A8702}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DFB08363-202E-412D-8812-349EF10A8702}.Release|Any CPU.Build.0 = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D40C6568-1803-4934-9AE4-F4B8E96EBA90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D40C6568-1803-4934-9AE4-F4B8E96EBA90}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D40C6568-1803-4934-9AE4-F4B8E96EBA90}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D40C6568-1803-4934-9AE4-F4B8E96EBA90}.Debug|x64.Build.0 = Debug|Any CPU
+ {D40C6568-1803-4934-9AE4-F4B8E96EBA90}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D40C6568-1803-4934-9AE4-F4B8E96EBA90}.Debug|x86.Build.0 = Debug|Any CPU
+ {D40C6568-1803-4934-9AE4-F4B8E96EBA90}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D40C6568-1803-4934-9AE4-F4B8E96EBA90}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D40C6568-1803-4934-9AE4-F4B8E96EBA90}.Release|x64.ActiveCfg = Release|Any CPU
+ {D40C6568-1803-4934-9AE4-F4B8E96EBA90}.Release|x64.Build.0 = Release|Any CPU
+ {D40C6568-1803-4934-9AE4-F4B8E96EBA90}.Release|x86.ActiveCfg = Release|Any CPU
+ {D40C6568-1803-4934-9AE4-F4B8E96EBA90}.Release|x86.Build.0 = Release|Any CPU
+ {D84AFE4B-C016-4082-983B-EE79D69C87FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D84AFE4B-C016-4082-983B-EE79D69C87FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D84AFE4B-C016-4082-983B-EE79D69C87FC}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D84AFE4B-C016-4082-983B-EE79D69C87FC}.Debug|x64.Build.0 = Debug|Any CPU
+ {D84AFE4B-C016-4082-983B-EE79D69C87FC}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D84AFE4B-C016-4082-983B-EE79D69C87FC}.Debug|x86.Build.0 = Debug|Any CPU
+ {D84AFE4B-C016-4082-983B-EE79D69C87FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D84AFE4B-C016-4082-983B-EE79D69C87FC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D84AFE4B-C016-4082-983B-EE79D69C87FC}.Release|x64.ActiveCfg = Release|Any CPU
+ {D84AFE4B-C016-4082-983B-EE79D69C87FC}.Release|x64.Build.0 = Release|Any CPU
+ {D84AFE4B-C016-4082-983B-EE79D69C87FC}.Release|x86.ActiveCfg = Release|Any CPU
+ {D84AFE4B-C016-4082-983B-EE79D69C87FC}.Release|x86.Build.0 = Release|Any CPU
+ {4D4CB21E-49D9-4AFA-8321-EA1F00EB01F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4D4CB21E-49D9-4AFA-8321-EA1F00EB01F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4D4CB21E-49D9-4AFA-8321-EA1F00EB01F0}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {4D4CB21E-49D9-4AFA-8321-EA1F00EB01F0}.Debug|x64.Build.0 = Debug|Any CPU
+ {4D4CB21E-49D9-4AFA-8321-EA1F00EB01F0}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4D4CB21E-49D9-4AFA-8321-EA1F00EB01F0}.Debug|x86.Build.0 = Debug|Any CPU
+ {4D4CB21E-49D9-4AFA-8321-EA1F00EB01F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4D4CB21E-49D9-4AFA-8321-EA1F00EB01F0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4D4CB21E-49D9-4AFA-8321-EA1F00EB01F0}.Release|x64.ActiveCfg = Release|Any CPU
+ {4D4CB21E-49D9-4AFA-8321-EA1F00EB01F0}.Release|x64.Build.0 = Release|Any CPU
+ {4D4CB21E-49D9-4AFA-8321-EA1F00EB01F0}.Release|x86.ActiveCfg = Release|Any CPU
+ {4D4CB21E-49D9-4AFA-8321-EA1F00EB01F0}.Release|x86.Build.0 = Release|Any CPU
+ {B395CABC-BF04-467E-80A0-6E7837688FFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B395CABC-BF04-467E-80A0-6E7837688FFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B395CABC-BF04-467E-80A0-6E7837688FFF}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B395CABC-BF04-467E-80A0-6E7837688FFF}.Debug|x64.Build.0 = Debug|Any CPU
+ {B395CABC-BF04-467E-80A0-6E7837688FFF}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B395CABC-BF04-467E-80A0-6E7837688FFF}.Debug|x86.Build.0 = Debug|Any CPU
+ {B395CABC-BF04-467E-80A0-6E7837688FFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B395CABC-BF04-467E-80A0-6E7837688FFF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B395CABC-BF04-467E-80A0-6E7837688FFF}.Release|x64.ActiveCfg = Release|Any CPU
+ {B395CABC-BF04-467E-80A0-6E7837688FFF}.Release|x64.Build.0 = Release|Any CPU
+ {B395CABC-BF04-467E-80A0-6E7837688FFF}.Release|x86.ActiveCfg = Release|Any CPU
+ {B395CABC-BF04-467E-80A0-6E7837688FFF}.Release|x86.Build.0 = Release|Any CPU
+ {165F8B1C-97F3-4779-B2AD-035C6E53E085}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {165F8B1C-97F3-4779-B2AD-035C6E53E085}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {165F8B1C-97F3-4779-B2AD-035C6E53E085}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {165F8B1C-97F3-4779-B2AD-035C6E53E085}.Debug|x64.Build.0 = Debug|Any CPU
+ {165F8B1C-97F3-4779-B2AD-035C6E53E085}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {165F8B1C-97F3-4779-B2AD-035C6E53E085}.Debug|x86.Build.0 = Debug|Any CPU
+ {165F8B1C-97F3-4779-B2AD-035C6E53E085}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {165F8B1C-97F3-4779-B2AD-035C6E53E085}.Release|Any CPU.Build.0 = Release|Any CPU
+ {165F8B1C-97F3-4779-B2AD-035C6E53E085}.Release|x64.ActiveCfg = Release|Any CPU
+ {165F8B1C-97F3-4779-B2AD-035C6E53E085}.Release|x64.Build.0 = Release|Any CPU
+ {165F8B1C-97F3-4779-B2AD-035C6E53E085}.Release|x86.ActiveCfg = Release|Any CPU
+ {165F8B1C-97F3-4779-B2AD-035C6E53E085}.Release|x86.Build.0 = Release|Any CPU
+ {9C4D6CCF-D959-43C1-9EDC-E6D5B4EC5356}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9C4D6CCF-D959-43C1-9EDC-E6D5B4EC5356}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9C4D6CCF-D959-43C1-9EDC-E6D5B4EC5356}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {9C4D6CCF-D959-43C1-9EDC-E6D5B4EC5356}.Debug|x64.Build.0 = Debug|Any CPU
+ {9C4D6CCF-D959-43C1-9EDC-E6D5B4EC5356}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9C4D6CCF-D959-43C1-9EDC-E6D5B4EC5356}.Debug|x86.Build.0 = Debug|Any CPU
+ {9C4D6CCF-D959-43C1-9EDC-E6D5B4EC5356}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9C4D6CCF-D959-43C1-9EDC-E6D5B4EC5356}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9C4D6CCF-D959-43C1-9EDC-E6D5B4EC5356}.Release|x64.ActiveCfg = Release|Any CPU
+ {9C4D6CCF-D959-43C1-9EDC-E6D5B4EC5356}.Release|x64.Build.0 = Release|Any CPU
+ {9C4D6CCF-D959-43C1-9EDC-E6D5B4EC5356}.Release|x86.ActiveCfg = Release|Any CPU
+ {9C4D6CCF-D959-43C1-9EDC-E6D5B4EC5356}.Release|x86.Build.0 = Release|Any CPU
+ {A030D742-2BD1-4A5C-8F5A-D0E872AE5946}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A030D742-2BD1-4A5C-8F5A-D0E872AE5946}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A030D742-2BD1-4A5C-8F5A-D0E872AE5946}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {A030D742-2BD1-4A5C-8F5A-D0E872AE5946}.Debug|x64.Build.0 = Debug|Any CPU
+ {A030D742-2BD1-4A5C-8F5A-D0E872AE5946}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {A030D742-2BD1-4A5C-8F5A-D0E872AE5946}.Debug|x86.Build.0 = Debug|Any CPU
+ {A030D742-2BD1-4A5C-8F5A-D0E872AE5946}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A030D742-2BD1-4A5C-8F5A-D0E872AE5946}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A030D742-2BD1-4A5C-8F5A-D0E872AE5946}.Release|x64.ActiveCfg = Release|Any CPU
+ {A030D742-2BD1-4A5C-8F5A-D0E872AE5946}.Release|x64.Build.0 = Release|Any CPU
+ {A030D742-2BD1-4A5C-8F5A-D0E872AE5946}.Release|x86.ActiveCfg = Release|Any CPU
+ {A030D742-2BD1-4A5C-8F5A-D0E872AE5946}.Release|x86.Build.0 = Release|Any CPU
+ {90C58F79-9136-4E1C-9CF6-80C0A58468DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {90C58F79-9136-4E1C-9CF6-80C0A58468DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {90C58F79-9136-4E1C-9CF6-80C0A58468DB}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {90C58F79-9136-4E1C-9CF6-80C0A58468DB}.Debug|x64.Build.0 = Debug|Any CPU
+ {90C58F79-9136-4E1C-9CF6-80C0A58468DB}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {90C58F79-9136-4E1C-9CF6-80C0A58468DB}.Debug|x86.Build.0 = Debug|Any CPU
+ {90C58F79-9136-4E1C-9CF6-80C0A58468DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {90C58F79-9136-4E1C-9CF6-80C0A58468DB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {90C58F79-9136-4E1C-9CF6-80C0A58468DB}.Release|x64.ActiveCfg = Release|Any CPU
+ {90C58F79-9136-4E1C-9CF6-80C0A58468DB}.Release|x64.Build.0 = Release|Any CPU
+ {90C58F79-9136-4E1C-9CF6-80C0A58468DB}.Release|x86.ActiveCfg = Release|Any CPU
+ {90C58F79-9136-4E1C-9CF6-80C0A58468DB}.Release|x86.Build.0 = Release|Any CPU
+ {07086DCE-DE16-45A7-B04C-ED6B0737CE6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {07086DCE-DE16-45A7-B04C-ED6B0737CE6B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {07086DCE-DE16-45A7-B04C-ED6B0737CE6B}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {07086DCE-DE16-45A7-B04C-ED6B0737CE6B}.Debug|x64.Build.0 = Debug|Any CPU
+ {07086DCE-DE16-45A7-B04C-ED6B0737CE6B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {07086DCE-DE16-45A7-B04C-ED6B0737CE6B}.Debug|x86.Build.0 = Debug|Any CPU
+ {07086DCE-DE16-45A7-B04C-ED6B0737CE6B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {07086DCE-DE16-45A7-B04C-ED6B0737CE6B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {07086DCE-DE16-45A7-B04C-ED6B0737CE6B}.Release|x64.ActiveCfg = Release|Any CPU
+ {07086DCE-DE16-45A7-B04C-ED6B0737CE6B}.Release|x64.Build.0 = Release|Any CPU
+ {07086DCE-DE16-45A7-B04C-ED6B0737CE6B}.Release|x86.ActiveCfg = Release|Any CPU
+ {07086DCE-DE16-45A7-B04C-ED6B0737CE6B}.Release|x86.Build.0 = Release|Any CPU
+ {8460364F-0F95-4F76-AAF3-20BD120E95E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8460364F-0F95-4F76-AAF3-20BD120E95E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8460364F-0F95-4F76-AAF3-20BD120E95E1}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {8460364F-0F95-4F76-AAF3-20BD120E95E1}.Debug|x64.Build.0 = Debug|Any CPU
+ {8460364F-0F95-4F76-AAF3-20BD120E95E1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8460364F-0F95-4F76-AAF3-20BD120E95E1}.Debug|x86.Build.0 = Debug|Any CPU
+ {8460364F-0F95-4F76-AAF3-20BD120E95E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8460364F-0F95-4F76-AAF3-20BD120E95E1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8460364F-0F95-4F76-AAF3-20BD120E95E1}.Release|x64.ActiveCfg = Release|Any CPU
+ {8460364F-0F95-4F76-AAF3-20BD120E95E1}.Release|x64.Build.0 = Release|Any CPU
+ {8460364F-0F95-4F76-AAF3-20BD120E95E1}.Release|x86.ActiveCfg = Release|Any CPU
+ {8460364F-0F95-4F76-AAF3-20BD120E95E1}.Release|x86.Build.0 = Release|Any CPU
+ {54FFB523-A37C-4520-8FF8-9A8DEE8528BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {54FFB523-A37C-4520-8FF8-9A8DEE8528BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {54FFB523-A37C-4520-8FF8-9A8DEE8528BF}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {54FFB523-A37C-4520-8FF8-9A8DEE8528BF}.Debug|x64.Build.0 = Debug|Any CPU
+ {54FFB523-A37C-4520-8FF8-9A8DEE8528BF}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {54FFB523-A37C-4520-8FF8-9A8DEE8528BF}.Debug|x86.Build.0 = Debug|Any CPU
+ {54FFB523-A37C-4520-8FF8-9A8DEE8528BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {54FFB523-A37C-4520-8FF8-9A8DEE8528BF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {54FFB523-A37C-4520-8FF8-9A8DEE8528BF}.Release|x64.ActiveCfg = Release|Any CPU
+ {54FFB523-A37C-4520-8FF8-9A8DEE8528BF}.Release|x64.Build.0 = Release|Any CPU
+ {54FFB523-A37C-4520-8FF8-9A8DEE8528BF}.Release|x86.ActiveCfg = Release|Any CPU
+ {54FFB523-A37C-4520-8FF8-9A8DEE8528BF}.Release|x86.Build.0 = Release|Any CPU
+ {4DAFD379-D4DB-4FA4-BDF0-CDEEF2F40670}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4DAFD379-D4DB-4FA4-BDF0-CDEEF2F40670}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4DAFD379-D4DB-4FA4-BDF0-CDEEF2F40670}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {4DAFD379-D4DB-4FA4-BDF0-CDEEF2F40670}.Debug|x64.Build.0 = Debug|Any CPU
+ {4DAFD379-D4DB-4FA4-BDF0-CDEEF2F40670}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4DAFD379-D4DB-4FA4-BDF0-CDEEF2F40670}.Debug|x86.Build.0 = Debug|Any CPU
+ {4DAFD379-D4DB-4FA4-BDF0-CDEEF2F40670}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4DAFD379-D4DB-4FA4-BDF0-CDEEF2F40670}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4DAFD379-D4DB-4FA4-BDF0-CDEEF2F40670}.Release|x64.ActiveCfg = Release|Any CPU
+ {4DAFD379-D4DB-4FA4-BDF0-CDEEF2F40670}.Release|x64.Build.0 = Release|Any CPU
+ {4DAFD379-D4DB-4FA4-BDF0-CDEEF2F40670}.Release|x86.ActiveCfg = Release|Any CPU
+ {4DAFD379-D4DB-4FA4-BDF0-CDEEF2F40670}.Release|x86.Build.0 = Release|Any CPU
+ {D1D24CD0-6EAF-48B7-99D4-8F993CC9ED3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D1D24CD0-6EAF-48B7-99D4-8F993CC9ED3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D1D24CD0-6EAF-48B7-99D4-8F993CC9ED3C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D1D24CD0-6EAF-48B7-99D4-8F993CC9ED3C}.Debug|x64.Build.0 = Debug|Any CPU
+ {D1D24CD0-6EAF-48B7-99D4-8F993CC9ED3C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D1D24CD0-6EAF-48B7-99D4-8F993CC9ED3C}.Debug|x86.Build.0 = Debug|Any CPU
+ {D1D24CD0-6EAF-48B7-99D4-8F993CC9ED3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D1D24CD0-6EAF-48B7-99D4-8F993CC9ED3C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D1D24CD0-6EAF-48B7-99D4-8F993CC9ED3C}.Release|x64.ActiveCfg = Release|Any CPU
+ {D1D24CD0-6EAF-48B7-99D4-8F993CC9ED3C}.Release|x64.Build.0 = Release|Any CPU
+ {D1D24CD0-6EAF-48B7-99D4-8F993CC9ED3C}.Release|x86.ActiveCfg = Release|Any CPU
+ {D1D24CD0-6EAF-48B7-99D4-8F993CC9ED3C}.Release|x86.Build.0 = Release|Any CPU
+ {BC11EDEE-4684-4910-A2FB-1545153C918F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BC11EDEE-4684-4910-A2FB-1545153C918F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BC11EDEE-4684-4910-A2FB-1545153C918F}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {BC11EDEE-4684-4910-A2FB-1545153C918F}.Debug|x64.Build.0 = Debug|Any CPU
+ {BC11EDEE-4684-4910-A2FB-1545153C918F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BC11EDEE-4684-4910-A2FB-1545153C918F}.Debug|x86.Build.0 = Debug|Any CPU
+ {BC11EDEE-4684-4910-A2FB-1545153C918F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BC11EDEE-4684-4910-A2FB-1545153C918F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BC11EDEE-4684-4910-A2FB-1545153C918F}.Release|x64.ActiveCfg = Release|Any CPU
+ {BC11EDEE-4684-4910-A2FB-1545153C918F}.Release|x64.Build.0 = Release|Any CPU
+ {BC11EDEE-4684-4910-A2FB-1545153C918F}.Release|x86.ActiveCfg = Release|Any CPU
+ {BC11EDEE-4684-4910-A2FB-1545153C918F}.Release|x86.Build.0 = Release|Any CPU
+ {5900AA9F-1EE9-4BB4-ADCD-EFDB13F5B869}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5900AA9F-1EE9-4BB4-ADCD-EFDB13F5B869}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5900AA9F-1EE9-4BB4-ADCD-EFDB13F5B869}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {5900AA9F-1EE9-4BB4-ADCD-EFDB13F5B869}.Debug|x64.Build.0 = Debug|Any CPU
+ {5900AA9F-1EE9-4BB4-ADCD-EFDB13F5B869}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5900AA9F-1EE9-4BB4-ADCD-EFDB13F5B869}.Debug|x86.Build.0 = Debug|Any CPU
+ {5900AA9F-1EE9-4BB4-ADCD-EFDB13F5B869}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5900AA9F-1EE9-4BB4-ADCD-EFDB13F5B869}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5900AA9F-1EE9-4BB4-ADCD-EFDB13F5B869}.Release|x64.ActiveCfg = Release|Any CPU
+ {5900AA9F-1EE9-4BB4-ADCD-EFDB13F5B869}.Release|x64.Build.0 = Release|Any CPU
+ {5900AA9F-1EE9-4BB4-ADCD-EFDB13F5B869}.Release|x86.ActiveCfg = Release|Any CPU
+ {5900AA9F-1EE9-4BB4-ADCD-EFDB13F5B869}.Release|x86.Build.0 = Release|Any CPU
+ {1CF77DCF-2C6D-4E25-89C5-74EB32486A89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1CF77DCF-2C6D-4E25-89C5-74EB32486A89}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1CF77DCF-2C6D-4E25-89C5-74EB32486A89}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {1CF77DCF-2C6D-4E25-89C5-74EB32486A89}.Debug|x64.Build.0 = Debug|Any CPU
+ {1CF77DCF-2C6D-4E25-89C5-74EB32486A89}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1CF77DCF-2C6D-4E25-89C5-74EB32486A89}.Debug|x86.Build.0 = Debug|Any CPU
+ {1CF77DCF-2C6D-4E25-89C5-74EB32486A89}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1CF77DCF-2C6D-4E25-89C5-74EB32486A89}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1CF77DCF-2C6D-4E25-89C5-74EB32486A89}.Release|x64.ActiveCfg = Release|Any CPU
+ {1CF77DCF-2C6D-4E25-89C5-74EB32486A89}.Release|x64.Build.0 = Release|Any CPU
+ {1CF77DCF-2C6D-4E25-89C5-74EB32486A89}.Release|x86.ActiveCfg = Release|Any CPU
+ {1CF77DCF-2C6D-4E25-89C5-74EB32486A89}.Release|x86.Build.0 = Release|Any CPU
+ {42C7D8FD-2AF1-4E49-9EDE-EBAE15E149C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {42C7D8FD-2AF1-4E49-9EDE-EBAE15E149C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {42C7D8FD-2AF1-4E49-9EDE-EBAE15E149C9}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {42C7D8FD-2AF1-4E49-9EDE-EBAE15E149C9}.Debug|x64.Build.0 = Debug|Any CPU
+ {42C7D8FD-2AF1-4E49-9EDE-EBAE15E149C9}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {42C7D8FD-2AF1-4E49-9EDE-EBAE15E149C9}.Debug|x86.Build.0 = Debug|Any CPU
+ {42C7D8FD-2AF1-4E49-9EDE-EBAE15E149C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {42C7D8FD-2AF1-4E49-9EDE-EBAE15E149C9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {42C7D8FD-2AF1-4E49-9EDE-EBAE15E149C9}.Release|x64.ActiveCfg = Release|Any CPU
+ {42C7D8FD-2AF1-4E49-9EDE-EBAE15E149C9}.Release|x64.Build.0 = Release|Any CPU
+ {42C7D8FD-2AF1-4E49-9EDE-EBAE15E149C9}.Release|x86.ActiveCfg = Release|Any CPU
+ {42C7D8FD-2AF1-4E49-9EDE-EBAE15E149C9}.Release|x86.Build.0 = Release|Any CPU
+ {3F8CF55E-4138-483D-ABBF-917E6095FB14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3F8CF55E-4138-483D-ABBF-917E6095FB14}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3F8CF55E-4138-483D-ABBF-917E6095FB14}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {3F8CF55E-4138-483D-ABBF-917E6095FB14}.Debug|x64.Build.0 = Debug|Any CPU
+ {3F8CF55E-4138-483D-ABBF-917E6095FB14}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3F8CF55E-4138-483D-ABBF-917E6095FB14}.Debug|x86.Build.0 = Debug|Any CPU
+ {3F8CF55E-4138-483D-ABBF-917E6095FB14}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3F8CF55E-4138-483D-ABBF-917E6095FB14}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3F8CF55E-4138-483D-ABBF-917E6095FB14}.Release|x64.ActiveCfg = Release|Any CPU
+ {3F8CF55E-4138-483D-ABBF-917E6095FB14}.Release|x64.Build.0 = Release|Any CPU
+ {3F8CF55E-4138-483D-ABBF-917E6095FB14}.Release|x86.ActiveCfg = Release|Any CPU
+ {3F8CF55E-4138-483D-ABBF-917E6095FB14}.Release|x86.Build.0 = Release|Any CPU
+ {85686C3E-0DD7-4CB7-98AD-B76C10B7C414}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {85686C3E-0DD7-4CB7-98AD-B76C10B7C414}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {85686C3E-0DD7-4CB7-98AD-B76C10B7C414}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {85686C3E-0DD7-4CB7-98AD-B76C10B7C414}.Debug|x64.Build.0 = Debug|Any CPU
+ {85686C3E-0DD7-4CB7-98AD-B76C10B7C414}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {85686C3E-0DD7-4CB7-98AD-B76C10B7C414}.Debug|x86.Build.0 = Debug|Any CPU
+ {85686C3E-0DD7-4CB7-98AD-B76C10B7C414}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {85686C3E-0DD7-4CB7-98AD-B76C10B7C414}.Release|Any CPU.Build.0 = Release|Any CPU
+ {85686C3E-0DD7-4CB7-98AD-B76C10B7C414}.Release|x64.ActiveCfg = Release|Any CPU
+ {85686C3E-0DD7-4CB7-98AD-B76C10B7C414}.Release|x64.Build.0 = Release|Any CPU
+ {85686C3E-0DD7-4CB7-98AD-B76C10B7C414}.Release|x86.ActiveCfg = Release|Any CPU
+ {85686C3E-0DD7-4CB7-98AD-B76C10B7C414}.Release|x86.Build.0 = Release|Any CPU
+ {43F04C6D-1022-4D29-8B37-8473FE06E62E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {43F04C6D-1022-4D29-8B37-8473FE06E62E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {43F04C6D-1022-4D29-8B37-8473FE06E62E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {43F04C6D-1022-4D29-8B37-8473FE06E62E}.Debug|x64.Build.0 = Debug|Any CPU
+ {43F04C6D-1022-4D29-8B37-8473FE06E62E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {43F04C6D-1022-4D29-8B37-8473FE06E62E}.Debug|x86.Build.0 = Debug|Any CPU
+ {43F04C6D-1022-4D29-8B37-8473FE06E62E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {43F04C6D-1022-4D29-8B37-8473FE06E62E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {43F04C6D-1022-4D29-8B37-8473FE06E62E}.Release|x64.ActiveCfg = Release|Any CPU
+ {43F04C6D-1022-4D29-8B37-8473FE06E62E}.Release|x64.Build.0 = Release|Any CPU
+ {43F04C6D-1022-4D29-8B37-8473FE06E62E}.Release|x86.ActiveCfg = Release|Any CPU
+ {43F04C6D-1022-4D29-8B37-8473FE06E62E}.Release|x86.Build.0 = Release|Any CPU
+ {751FA84E-2689-4C09-838A-0CBC6F297249}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {751FA84E-2689-4C09-838A-0CBC6F297249}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {751FA84E-2689-4C09-838A-0CBC6F297249}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {751FA84E-2689-4C09-838A-0CBC6F297249}.Debug|x64.Build.0 = Debug|Any CPU
+ {751FA84E-2689-4C09-838A-0CBC6F297249}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {751FA84E-2689-4C09-838A-0CBC6F297249}.Debug|x86.Build.0 = Debug|Any CPU
+ {751FA84E-2689-4C09-838A-0CBC6F297249}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {751FA84E-2689-4C09-838A-0CBC6F297249}.Release|Any CPU.Build.0 = Release|Any CPU
+ {751FA84E-2689-4C09-838A-0CBC6F297249}.Release|x64.ActiveCfg = Release|Any CPU
+ {751FA84E-2689-4C09-838A-0CBC6F297249}.Release|x64.Build.0 = Release|Any CPU
+ {751FA84E-2689-4C09-838A-0CBC6F297249}.Release|x86.ActiveCfg = Release|Any CPU
+ {751FA84E-2689-4C09-838A-0CBC6F297249}.Release|x86.Build.0 = Release|Any CPU
+ {212BEA83-8F25-411D-AD69-314038A9DC9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {212BEA83-8F25-411D-AD69-314038A9DC9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {212BEA83-8F25-411D-AD69-314038A9DC9C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {212BEA83-8F25-411D-AD69-314038A9DC9C}.Debug|x64.Build.0 = Debug|Any CPU
+ {212BEA83-8F25-411D-AD69-314038A9DC9C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {212BEA83-8F25-411D-AD69-314038A9DC9C}.Debug|x86.Build.0 = Debug|Any CPU
+ {212BEA83-8F25-411D-AD69-314038A9DC9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {212BEA83-8F25-411D-AD69-314038A9DC9C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {212BEA83-8F25-411D-AD69-314038A9DC9C}.Release|x64.ActiveCfg = Release|Any CPU
+ {212BEA83-8F25-411D-AD69-314038A9DC9C}.Release|x64.Build.0 = Release|Any CPU
+ {212BEA83-8F25-411D-AD69-314038A9DC9C}.Release|x86.ActiveCfg = Release|Any CPU
+ {212BEA83-8F25-411D-AD69-314038A9DC9C}.Release|x86.Build.0 = Release|Any CPU
+ {8CFFF7A2-464E-41B6-A35B-1E9A31C14DBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8CFFF7A2-464E-41B6-A35B-1E9A31C14DBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8CFFF7A2-464E-41B6-A35B-1E9A31C14DBF}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {8CFFF7A2-464E-41B6-A35B-1E9A31C14DBF}.Debug|x64.Build.0 = Debug|Any CPU
+ {8CFFF7A2-464E-41B6-A35B-1E9A31C14DBF}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8CFFF7A2-464E-41B6-A35B-1E9A31C14DBF}.Debug|x86.Build.0 = Debug|Any CPU
+ {8CFFF7A2-464E-41B6-A35B-1E9A31C14DBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8CFFF7A2-464E-41B6-A35B-1E9A31C14DBF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8CFFF7A2-464E-41B6-A35B-1E9A31C14DBF}.Release|x64.ActiveCfg = Release|Any CPU
+ {8CFFF7A2-464E-41B6-A35B-1E9A31C14DBF}.Release|x64.Build.0 = Release|Any CPU
+ {8CFFF7A2-464E-41B6-A35B-1E9A31C14DBF}.Release|x86.ActiveCfg = Release|Any CPU
+ {8CFFF7A2-464E-41B6-A35B-1E9A31C14DBF}.Release|x86.Build.0 = Release|Any CPU
+ {153E1917-3876-4BA3-89EA-A6D24844E64E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {153E1917-3876-4BA3-89EA-A6D24844E64E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {153E1917-3876-4BA3-89EA-A6D24844E64E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {153E1917-3876-4BA3-89EA-A6D24844E64E}.Debug|x64.Build.0 = Debug|Any CPU
+ {153E1917-3876-4BA3-89EA-A6D24844E64E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {153E1917-3876-4BA3-89EA-A6D24844E64E}.Debug|x86.Build.0 = Debug|Any CPU
+ {153E1917-3876-4BA3-89EA-A6D24844E64E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {153E1917-3876-4BA3-89EA-A6D24844E64E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {153E1917-3876-4BA3-89EA-A6D24844E64E}.Release|x64.ActiveCfg = Release|Any CPU
+ {153E1917-3876-4BA3-89EA-A6D24844E64E}.Release|x64.Build.0 = Release|Any CPU
+ {153E1917-3876-4BA3-89EA-A6D24844E64E}.Release|x86.ActiveCfg = Release|Any CPU
+ {153E1917-3876-4BA3-89EA-A6D24844E64E}.Release|x86.Build.0 = Release|Any CPU
+ {A92CD1D6-C53E-46FF-918C-3CD8A612B0FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A92CD1D6-C53E-46FF-918C-3CD8A612B0FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A92CD1D6-C53E-46FF-918C-3CD8A612B0FF}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {A92CD1D6-C53E-46FF-918C-3CD8A612B0FF}.Debug|x64.Build.0 = Debug|Any CPU
+ {A92CD1D6-C53E-46FF-918C-3CD8A612B0FF}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {A92CD1D6-C53E-46FF-918C-3CD8A612B0FF}.Debug|x86.Build.0 = Debug|Any CPU
+ {A92CD1D6-C53E-46FF-918C-3CD8A612B0FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A92CD1D6-C53E-46FF-918C-3CD8A612B0FF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A92CD1D6-C53E-46FF-918C-3CD8A612B0FF}.Release|x64.ActiveCfg = Release|Any CPU
+ {A92CD1D6-C53E-46FF-918C-3CD8A612B0FF}.Release|x64.Build.0 = Release|Any CPU
+ {A92CD1D6-C53E-46FF-918C-3CD8A612B0FF}.Release|x86.ActiveCfg = Release|Any CPU
+ {A92CD1D6-C53E-46FF-918C-3CD8A612B0FF}.Release|x86.Build.0 = Release|Any CPU
+ {2544A001-8E77-4498-8192-A3FE224CC5AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2544A001-8E77-4498-8192-A3FE224CC5AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2544A001-8E77-4498-8192-A3FE224CC5AA}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {2544A001-8E77-4498-8192-A3FE224CC5AA}.Debug|x64.Build.0 = Debug|Any CPU
+ {2544A001-8E77-4498-8192-A3FE224CC5AA}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2544A001-8E77-4498-8192-A3FE224CC5AA}.Debug|x86.Build.0 = Debug|Any CPU
+ {2544A001-8E77-4498-8192-A3FE224CC5AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2544A001-8E77-4498-8192-A3FE224CC5AA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2544A001-8E77-4498-8192-A3FE224CC5AA}.Release|x64.ActiveCfg = Release|Any CPU
+ {2544A001-8E77-4498-8192-A3FE224CC5AA}.Release|x64.Build.0 = Release|Any CPU
+ {2544A001-8E77-4498-8192-A3FE224CC5AA}.Release|x86.ActiveCfg = Release|Any CPU
+ {2544A001-8E77-4498-8192-A3FE224CC5AA}.Release|x86.Build.0 = Release|Any CPU
+ {B1486BF3-05E8-4445-9C39-D9064DD61B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B1486BF3-05E8-4445-9C39-D9064DD61B98}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B1486BF3-05E8-4445-9C39-D9064DD61B98}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B1486BF3-05E8-4445-9C39-D9064DD61B98}.Debug|x64.Build.0 = Debug|Any CPU
+ {B1486BF3-05E8-4445-9C39-D9064DD61B98}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B1486BF3-05E8-4445-9C39-D9064DD61B98}.Debug|x86.Build.0 = Debug|Any CPU
+ {B1486BF3-05E8-4445-9C39-D9064DD61B98}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B1486BF3-05E8-4445-9C39-D9064DD61B98}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B1486BF3-05E8-4445-9C39-D9064DD61B98}.Release|x64.ActiveCfg = Release|Any CPU
+ {B1486BF3-05E8-4445-9C39-D9064DD61B98}.Release|x64.Build.0 = Release|Any CPU
+ {B1486BF3-05E8-4445-9C39-D9064DD61B98}.Release|x86.ActiveCfg = Release|Any CPU
+ {B1486BF3-05E8-4445-9C39-D9064DD61B98}.Release|x86.Build.0 = Release|Any CPU
+ {6641EED9-6A71-4AA0-9F95-762040C2232E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6641EED9-6A71-4AA0-9F95-762040C2232E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6641EED9-6A71-4AA0-9F95-762040C2232E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {6641EED9-6A71-4AA0-9F95-762040C2232E}.Debug|x64.Build.0 = Debug|Any CPU
+ {6641EED9-6A71-4AA0-9F95-762040C2232E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6641EED9-6A71-4AA0-9F95-762040C2232E}.Debug|x86.Build.0 = Debug|Any CPU
+ {6641EED9-6A71-4AA0-9F95-762040C2232E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6641EED9-6A71-4AA0-9F95-762040C2232E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6641EED9-6A71-4AA0-9F95-762040C2232E}.Release|x64.ActiveCfg = Release|Any CPU
+ {6641EED9-6A71-4AA0-9F95-762040C2232E}.Release|x64.Build.0 = Release|Any CPU
+ {6641EED9-6A71-4AA0-9F95-762040C2232E}.Release|x86.ActiveCfg = Release|Any CPU
+ {6641EED9-6A71-4AA0-9F95-762040C2232E}.Release|x86.Build.0 = Release|Any CPU
+ {484180F0-F859-4A03-853B-3B205173A0D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {484180F0-F859-4A03-853B-3B205173A0D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {484180F0-F859-4A03-853B-3B205173A0D7}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {484180F0-F859-4A03-853B-3B205173A0D7}.Debug|x64.Build.0 = Debug|Any CPU
+ {484180F0-F859-4A03-853B-3B205173A0D7}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {484180F0-F859-4A03-853B-3B205173A0D7}.Debug|x86.Build.0 = Debug|Any CPU
+ {484180F0-F859-4A03-853B-3B205173A0D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {484180F0-F859-4A03-853B-3B205173A0D7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {484180F0-F859-4A03-853B-3B205173A0D7}.Release|x64.ActiveCfg = Release|Any CPU
+ {484180F0-F859-4A03-853B-3B205173A0D7}.Release|x64.Build.0 = Release|Any CPU
+ {484180F0-F859-4A03-853B-3B205173A0D7}.Release|x86.ActiveCfg = Release|Any CPU
+ {484180F0-F859-4A03-853B-3B205173A0D7}.Release|x86.Build.0 = Release|Any CPU
+ {E5C6C42B-B085-4841-A7E6-CE9CE8B86399}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E5C6C42B-B085-4841-A7E6-CE9CE8B86399}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E5C6C42B-B085-4841-A7E6-CE9CE8B86399}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {E5C6C42B-B085-4841-A7E6-CE9CE8B86399}.Debug|x64.Build.0 = Debug|Any CPU
+ {E5C6C42B-B085-4841-A7E6-CE9CE8B86399}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E5C6C42B-B085-4841-A7E6-CE9CE8B86399}.Debug|x86.Build.0 = Debug|Any CPU
+ {E5C6C42B-B085-4841-A7E6-CE9CE8B86399}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E5C6C42B-B085-4841-A7E6-CE9CE8B86399}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E5C6C42B-B085-4841-A7E6-CE9CE8B86399}.Release|x64.ActiveCfg = Release|Any CPU
+ {E5C6C42B-B085-4841-A7E6-CE9CE8B86399}.Release|x64.Build.0 = Release|Any CPU
+ {E5C6C42B-B085-4841-A7E6-CE9CE8B86399}.Release|x86.ActiveCfg = Release|Any CPU
+ {E5C6C42B-B085-4841-A7E6-CE9CE8B86399}.Release|x86.Build.0 = Release|Any CPU
+ {C3662BE1-F669-4AF4-8880-BA0C0AB8BF75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C3662BE1-F669-4AF4-8880-BA0C0AB8BF75}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C3662BE1-F669-4AF4-8880-BA0C0AB8BF75}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {C3662BE1-F669-4AF4-8880-BA0C0AB8BF75}.Debug|x64.Build.0 = Debug|Any CPU
+ {C3662BE1-F669-4AF4-8880-BA0C0AB8BF75}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C3662BE1-F669-4AF4-8880-BA0C0AB8BF75}.Debug|x86.Build.0 = Debug|Any CPU
+ {C3662BE1-F669-4AF4-8880-BA0C0AB8BF75}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C3662BE1-F669-4AF4-8880-BA0C0AB8BF75}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C3662BE1-F669-4AF4-8880-BA0C0AB8BF75}.Release|x64.ActiveCfg = Release|Any CPU
+ {C3662BE1-F669-4AF4-8880-BA0C0AB8BF75}.Release|x64.Build.0 = Release|Any CPU
+ {C3662BE1-F669-4AF4-8880-BA0C0AB8BF75}.Release|x86.ActiveCfg = Release|Any CPU
+ {C3662BE1-F669-4AF4-8880-BA0C0AB8BF75}.Release|x86.Build.0 = Release|Any CPU
+ {356BEED8-6291-4464-8991-19E9FAD2E262}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {356BEED8-6291-4464-8991-19E9FAD2E262}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {356BEED8-6291-4464-8991-19E9FAD2E262}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {356BEED8-6291-4464-8991-19E9FAD2E262}.Debug|x64.Build.0 = Debug|Any CPU
+ {356BEED8-6291-4464-8991-19E9FAD2E262}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {356BEED8-6291-4464-8991-19E9FAD2E262}.Debug|x86.Build.0 = Debug|Any CPU
+ {356BEED8-6291-4464-8991-19E9FAD2E262}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {356BEED8-6291-4464-8991-19E9FAD2E262}.Release|Any CPU.Build.0 = Release|Any CPU
+ {356BEED8-6291-4464-8991-19E9FAD2E262}.Release|x64.ActiveCfg = Release|Any CPU
+ {356BEED8-6291-4464-8991-19E9FAD2E262}.Release|x64.Build.0 = Release|Any CPU
+ {356BEED8-6291-4464-8991-19E9FAD2E262}.Release|x86.ActiveCfg = Release|Any CPU
+ {356BEED8-6291-4464-8991-19E9FAD2E262}.Release|x86.Build.0 = Release|Any CPU
+ {E48EC44D-1793-4DD3-9931-A388EFC3B105}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E48EC44D-1793-4DD3-9931-A388EFC3B105}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E48EC44D-1793-4DD3-9931-A388EFC3B105}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {E48EC44D-1793-4DD3-9931-A388EFC3B105}.Debug|x64.Build.0 = Debug|Any CPU
+ {E48EC44D-1793-4DD3-9931-A388EFC3B105}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E48EC44D-1793-4DD3-9931-A388EFC3B105}.Debug|x86.Build.0 = Debug|Any CPU
+ {E48EC44D-1793-4DD3-9931-A388EFC3B105}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E48EC44D-1793-4DD3-9931-A388EFC3B105}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E48EC44D-1793-4DD3-9931-A388EFC3B105}.Release|x64.ActiveCfg = Release|Any CPU
+ {E48EC44D-1793-4DD3-9931-A388EFC3B105}.Release|x64.Build.0 = Release|Any CPU
+ {E48EC44D-1793-4DD3-9931-A388EFC3B105}.Release|x86.ActiveCfg = Release|Any CPU
+ {E48EC44D-1793-4DD3-9931-A388EFC3B105}.Release|x86.Build.0 = Release|Any CPU
+ {6ACF7BC9-233E-43D6-A11C-65E86B635E69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6ACF7BC9-233E-43D6-A11C-65E86B635E69}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6ACF7BC9-233E-43D6-A11C-65E86B635E69}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {6ACF7BC9-233E-43D6-A11C-65E86B635E69}.Debug|x64.Build.0 = Debug|Any CPU
+ {6ACF7BC9-233E-43D6-A11C-65E86B635E69}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6ACF7BC9-233E-43D6-A11C-65E86B635E69}.Debug|x86.Build.0 = Debug|Any CPU
+ {6ACF7BC9-233E-43D6-A11C-65E86B635E69}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6ACF7BC9-233E-43D6-A11C-65E86B635E69}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6ACF7BC9-233E-43D6-A11C-65E86B635E69}.Release|x64.ActiveCfg = Release|Any CPU
+ {6ACF7BC9-233E-43D6-A11C-65E86B635E69}.Release|x64.Build.0 = Release|Any CPU
+ {6ACF7BC9-233E-43D6-A11C-65E86B635E69}.Release|x86.ActiveCfg = Release|Any CPU
+ {6ACF7BC9-233E-43D6-A11C-65E86B635E69}.Release|x86.Build.0 = Release|Any CPU
+ {5DA60E85-6262-4A5D-BC25-02F0F00B45D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5DA60E85-6262-4A5D-BC25-02F0F00B45D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5DA60E85-6262-4A5D-BC25-02F0F00B45D0}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {5DA60E85-6262-4A5D-BC25-02F0F00B45D0}.Debug|x64.Build.0 = Debug|Any CPU
+ {5DA60E85-6262-4A5D-BC25-02F0F00B45D0}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5DA60E85-6262-4A5D-BC25-02F0F00B45D0}.Debug|x86.Build.0 = Debug|Any CPU
+ {5DA60E85-6262-4A5D-BC25-02F0F00B45D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5DA60E85-6262-4A5D-BC25-02F0F00B45D0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5DA60E85-6262-4A5D-BC25-02F0F00B45D0}.Release|x64.ActiveCfg = Release|Any CPU
+ {5DA60E85-6262-4A5D-BC25-02F0F00B45D0}.Release|x64.Build.0 = Release|Any CPU
+ {5DA60E85-6262-4A5D-BC25-02F0F00B45D0}.Release|x86.ActiveCfg = Release|Any CPU
+ {5DA60E85-6262-4A5D-BC25-02F0F00B45D0}.Release|x86.Build.0 = Release|Any CPU
+ {E2711373-5BF2-4FC2-8B44-2029B8596545}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E2711373-5BF2-4FC2-8B44-2029B8596545}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E2711373-5BF2-4FC2-8B44-2029B8596545}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {E2711373-5BF2-4FC2-8B44-2029B8596545}.Debug|x64.Build.0 = Debug|Any CPU
+ {E2711373-5BF2-4FC2-8B44-2029B8596545}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E2711373-5BF2-4FC2-8B44-2029B8596545}.Debug|x86.Build.0 = Debug|Any CPU
+ {E2711373-5BF2-4FC2-8B44-2029B8596545}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E2711373-5BF2-4FC2-8B44-2029B8596545}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E2711373-5BF2-4FC2-8B44-2029B8596545}.Release|x64.ActiveCfg = Release|Any CPU
+ {E2711373-5BF2-4FC2-8B44-2029B8596545}.Release|x64.Build.0 = Release|Any CPU
+ {E2711373-5BF2-4FC2-8B44-2029B8596545}.Release|x86.ActiveCfg = Release|Any CPU
+ {E2711373-5BF2-4FC2-8B44-2029B8596545}.Release|x86.Build.0 = Release|Any CPU
+ {4AE6C11F-4C2E-438D-845D-AD49755B4BED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4AE6C11F-4C2E-438D-845D-AD49755B4BED}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4AE6C11F-4C2E-438D-845D-AD49755B4BED}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {4AE6C11F-4C2E-438D-845D-AD49755B4BED}.Debug|x64.Build.0 = Debug|Any CPU
+ {4AE6C11F-4C2E-438D-845D-AD49755B4BED}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4AE6C11F-4C2E-438D-845D-AD49755B4BED}.Debug|x86.Build.0 = Debug|Any CPU
+ {4AE6C11F-4C2E-438D-845D-AD49755B4BED}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4AE6C11F-4C2E-438D-845D-AD49755B4BED}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4AE6C11F-4C2E-438D-845D-AD49755B4BED}.Release|x64.ActiveCfg = Release|Any CPU
+ {4AE6C11F-4C2E-438D-845D-AD49755B4BED}.Release|x64.Build.0 = Release|Any CPU
+ {4AE6C11F-4C2E-438D-845D-AD49755B4BED}.Release|x86.ActiveCfg = Release|Any CPU
+ {4AE6C11F-4C2E-438D-845D-AD49755B4BED}.Release|x86.Build.0 = Release|Any CPU
+ {7FF8F30E-BC11-4ADD-815E-C08998B9E831}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7FF8F30E-BC11-4ADD-815E-C08998B9E831}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7FF8F30E-BC11-4ADD-815E-C08998B9E831}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {7FF8F30E-BC11-4ADD-815E-C08998B9E831}.Debug|x64.Build.0 = Debug|Any CPU
+ {7FF8F30E-BC11-4ADD-815E-C08998B9E831}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7FF8F30E-BC11-4ADD-815E-C08998B9E831}.Debug|x86.Build.0 = Debug|Any CPU
+ {7FF8F30E-BC11-4ADD-815E-C08998B9E831}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7FF8F30E-BC11-4ADD-815E-C08998B9E831}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7FF8F30E-BC11-4ADD-815E-C08998B9E831}.Release|x64.ActiveCfg = Release|Any CPU
+ {7FF8F30E-BC11-4ADD-815E-C08998B9E831}.Release|x64.Build.0 = Release|Any CPU
+ {7FF8F30E-BC11-4ADD-815E-C08998B9E831}.Release|x86.ActiveCfg = Release|Any CPU
+ {7FF8F30E-BC11-4ADD-815E-C08998B9E831}.Release|x86.Build.0 = Release|Any CPU
+ {BD89BAE0-54E8-4B9E-81CC-A030B61FC157}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BD89BAE0-54E8-4B9E-81CC-A030B61FC157}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BD89BAE0-54E8-4B9E-81CC-A030B61FC157}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {BD89BAE0-54E8-4B9E-81CC-A030B61FC157}.Debug|x64.Build.0 = Debug|Any CPU
+ {BD89BAE0-54E8-4B9E-81CC-A030B61FC157}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BD89BAE0-54E8-4B9E-81CC-A030B61FC157}.Debug|x86.Build.0 = Debug|Any CPU
+ {BD89BAE0-54E8-4B9E-81CC-A030B61FC157}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BD89BAE0-54E8-4B9E-81CC-A030B61FC157}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BD89BAE0-54E8-4B9E-81CC-A030B61FC157}.Release|x64.ActiveCfg = Release|Any CPU
+ {BD89BAE0-54E8-4B9E-81CC-A030B61FC157}.Release|x64.Build.0 = Release|Any CPU
+ {BD89BAE0-54E8-4B9E-81CC-A030B61FC157}.Release|x86.ActiveCfg = Release|Any CPU
+ {BD89BAE0-54E8-4B9E-81CC-A030B61FC157}.Release|x86.Build.0 = Release|Any CPU
+ {A4F689F6-9C1C-48D9-9A93-101BCA7328D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A4F689F6-9C1C-48D9-9A93-101BCA7328D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A4F689F6-9C1C-48D9-9A93-101BCA7328D4}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {A4F689F6-9C1C-48D9-9A93-101BCA7328D4}.Debug|x64.Build.0 = Debug|Any CPU
+ {A4F689F6-9C1C-48D9-9A93-101BCA7328D4}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {A4F689F6-9C1C-48D9-9A93-101BCA7328D4}.Debug|x86.Build.0 = Debug|Any CPU
+ {A4F689F6-9C1C-48D9-9A93-101BCA7328D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A4F689F6-9C1C-48D9-9A93-101BCA7328D4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A4F689F6-9C1C-48D9-9A93-101BCA7328D4}.Release|x64.ActiveCfg = Release|Any CPU
+ {A4F689F6-9C1C-48D9-9A93-101BCA7328D4}.Release|x64.Build.0 = Release|Any CPU
+ {A4F689F6-9C1C-48D9-9A93-101BCA7328D4}.Release|x86.ActiveCfg = Release|Any CPU
+ {A4F689F6-9C1C-48D9-9A93-101BCA7328D4}.Release|x86.Build.0 = Release|Any CPU
+ {63ED1620-2FFF-42D5-BDA6-CC18FBAFEF1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {63ED1620-2FFF-42D5-BDA6-CC18FBAFEF1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {63ED1620-2FFF-42D5-BDA6-CC18FBAFEF1D}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {63ED1620-2FFF-42D5-BDA6-CC18FBAFEF1D}.Debug|x64.Build.0 = Debug|Any CPU
+ {63ED1620-2FFF-42D5-BDA6-CC18FBAFEF1D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {63ED1620-2FFF-42D5-BDA6-CC18FBAFEF1D}.Debug|x86.Build.0 = Debug|Any CPU
+ {63ED1620-2FFF-42D5-BDA6-CC18FBAFEF1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {63ED1620-2FFF-42D5-BDA6-CC18FBAFEF1D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {63ED1620-2FFF-42D5-BDA6-CC18FBAFEF1D}.Release|x64.ActiveCfg = Release|Any CPU
+ {63ED1620-2FFF-42D5-BDA6-CC18FBAFEF1D}.Release|x64.Build.0 = Release|Any CPU
+ {63ED1620-2FFF-42D5-BDA6-CC18FBAFEF1D}.Release|x86.ActiveCfg = Release|Any CPU
+ {63ED1620-2FFF-42D5-BDA6-CC18FBAFEF1D}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {065AC9B6-519D-488D-8C05-4CFAF47C0975} = {886F8F3F-C769-49C0-8BED-AA20B7B43A5D}
+ {D40C6568-1803-4934-9AE4-F4B8E96EBA90} = {065AC9B6-519D-488D-8C05-4CFAF47C0975}
+ {FD3102F2-CB16-4EDC-8C53-78CD34F43F5C} = {AEAD9D9F-2162-40F0-9380-4AA066192998}
+ {B395CABC-BF04-467E-80A0-6E7837688FFF} = {FD3102F2-CB16-4EDC-8C53-78CD34F43F5C}
+ {165F8B1C-97F3-4779-B2AD-035C6E53E085} = {FD3102F2-CB16-4EDC-8C53-78CD34F43F5C}
+ {9C4D6CCF-D959-43C1-9EDC-E6D5B4EC5356} = {065AC9B6-519D-488D-8C05-4CFAF47C0975}
+ {A030D742-2BD1-4A5C-8F5A-D0E872AE5946} = {FD3102F2-CB16-4EDC-8C53-78CD34F43F5C}
+ {90C58F79-9136-4E1C-9CF6-80C0A58468DB} = {FD3102F2-CB16-4EDC-8C53-78CD34F43F5C}
+ {07086DCE-DE16-45A7-B04C-ED6B0737CE6B} = {FD3102F2-CB16-4EDC-8C53-78CD34F43F5C}
+ {8460364F-0F95-4F76-AAF3-20BD120E95E1} = {FD3102F2-CB16-4EDC-8C53-78CD34F43F5C}
+ {54FFB523-A37C-4520-8FF8-9A8DEE8528BF} = {FD3102F2-CB16-4EDC-8C53-78CD34F43F5C}
+ {4DAFD379-D4DB-4FA4-BDF0-CDEEF2F40670} = {FD3102F2-CB16-4EDC-8C53-78CD34F43F5C}
+ {D1D24CD0-6EAF-48B7-99D4-8F993CC9ED3C} = {FD3102F2-CB16-4EDC-8C53-78CD34F43F5C}
+ {BC11EDEE-4684-4910-A2FB-1545153C918F} = {FD3102F2-CB16-4EDC-8C53-78CD34F43F5C}
+ {5900AA9F-1EE9-4BB4-ADCD-EFDB13F5B869} = {FD3102F2-CB16-4EDC-8C53-78CD34F43F5C}
+ {1CF77DCF-2C6D-4E25-89C5-74EB32486A89} = {FD3102F2-CB16-4EDC-8C53-78CD34F43F5C}
+ {42C7D8FD-2AF1-4E49-9EDE-EBAE15E149C9} = {FD3102F2-CB16-4EDC-8C53-78CD34F43F5C}
+ {3F8CF55E-4138-483D-ABBF-917E6095FB14} = {065AC9B6-519D-488D-8C05-4CFAF47C0975}
+ {85686C3E-0DD7-4CB7-98AD-B76C10B7C414} = {065AC9B6-519D-488D-8C05-4CFAF47C0975}
+ {43F04C6D-1022-4D29-8B37-8473FE06E62E} = {065AC9B6-519D-488D-8C05-4CFAF47C0975}
+ {751FA84E-2689-4C09-838A-0CBC6F297249} = {065AC9B6-519D-488D-8C05-4CFAF47C0975}
+ {476CF811-592F-44DA-9C86-6FB03F86862A} = {AEAD9D9F-2162-40F0-9380-4AA066192998}
+ {212BEA83-8F25-411D-AD69-314038A9DC9C} = {476CF811-592F-44DA-9C86-6FB03F86862A}
+ {8CFFF7A2-464E-41B6-A35B-1E9A31C14DBF} = {476CF811-592F-44DA-9C86-6FB03F86862A}
+ {153E1917-3876-4BA3-89EA-A6D24844E64E} = {476CF811-592F-44DA-9C86-6FB03F86862A}
+ {D556DEC3-E54F-4E85-990B-9A22638A8872} = {AEAD9D9F-2162-40F0-9380-4AA066192998}
+ {A92CD1D6-C53E-46FF-918C-3CD8A612B0FF} = {D556DEC3-E54F-4E85-990B-9A22638A8872}
+ {2544A001-8E77-4498-8192-A3FE224CC5AA} = {D556DEC3-E54F-4E85-990B-9A22638A8872}
+ {B1486BF3-05E8-4445-9C39-D9064DD61B98} = {D556DEC3-E54F-4E85-990B-9A22638A8872}
+ {C4FAAB8B-3F85-4E58-B6ED-79CBD33142AE} = {AEAD9D9F-2162-40F0-9380-4AA066192998}
+ {6641EED9-6A71-4AA0-9F95-762040C2232E} = {C4FAAB8B-3F85-4E58-B6ED-79CBD33142AE}
+ {484180F0-F859-4A03-853B-3B205173A0D7} = {C4FAAB8B-3F85-4E58-B6ED-79CBD33142AE}
+ {E5C6C42B-B085-4841-A7E6-CE9CE8B86399} = {C4FAAB8B-3F85-4E58-B6ED-79CBD33142AE}
+ {C3662BE1-F669-4AF4-8880-BA0C0AB8BF75} = {C4FAAB8B-3F85-4E58-B6ED-79CBD33142AE}
+ {356BEED8-6291-4464-8991-19E9FAD2E262} = {C4FAAB8B-3F85-4E58-B6ED-79CBD33142AE}
+ {20FBB84F-8A6F-4D51-B3EA-F20AE49942CE} = {886F8F3F-C769-49C0-8BED-AA20B7B43A5D}
+ {E48EC44D-1793-4DD3-9931-A388EFC3B105} = {20FBB84F-8A6F-4D51-B3EA-F20AE49942CE}
+ {FAEFE545-7021-47B2-B8F4-A4D90E3A1D95} = {AEAD9D9F-2162-40F0-9380-4AA066192998}
+ {6ACF7BC9-233E-43D6-A11C-65E86B635E69} = {FAEFE545-7021-47B2-B8F4-A4D90E3A1D95}
+ {DEE13036-D4A0-4AA8-BA32-DBA07EA395C2} = {886F8F3F-C769-49C0-8BED-AA20B7B43A5D}
+ {5DA60E85-6262-4A5D-BC25-02F0F00B45D0} = {DEE13036-D4A0-4AA8-BA32-DBA07EA395C2}
+ {E2711373-5BF2-4FC2-8B44-2029B8596545} = {FAEFE545-7021-47B2-B8F4-A4D90E3A1D95}
+ {4AE6C11F-4C2E-438D-845D-AD49755B4BED} = {DEE13036-D4A0-4AA8-BA32-DBA07EA395C2}
+ {7FF8F30E-BC11-4ADD-815E-C08998B9E831} = {FAEFE545-7021-47B2-B8F4-A4D90E3A1D95}
+ {BD89BAE0-54E8-4B9E-81CC-A030B61FC157} = {FAEFE545-7021-47B2-B8F4-A4D90E3A1D95}
+ {A4F689F6-9C1C-48D9-9A93-101BCA7328D4} = {DEE13036-D4A0-4AA8-BA32-DBA07EA395C2}
+ {63ED1620-2FFF-42D5-BDA6-CC18FBAFEF1D} = {DEE13036-D4A0-4AA8-BA32-DBA07EA395C2}
+ EndGlobalSection
EndGlobal
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples.sln.DotSettings b/modules/platforms/dotnet/examples/Apache.Ignite.Examples.sln.DotSettings
new file mode 100644
index 0000000..c39aa64
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples.sln.DotSettings
@@ -0,0 +1,17 @@
+<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
+ <s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=silent/@EntryIndexedValue"><?xml version="1.0" encoding="utf-16"?><Profile name="silent"><CSReorderTypeMembers>True</CSReorderTypeMembers><CSCodeStyleAttributes ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" RemoveRedundantParentheses="False" AddMissingParentheses="False" ArrangeBraces="False" ArrangeAttributes="False" ArrangeArgumentsStyle="False" />< [...]
+ <s:String x:Key="/Default/CodeStyle/CodeCleanup/SilentCleanupProfile/@EntryValue">silent</s:String>
+ <s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/IndentSubtags/@EntryValue">DoNotTouch</s:String>
+ <s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/IndentTagContent/@EntryValue">DoNotTouch</s:String>
+ <s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/AddImportsToDeepestScope/@EntryValue">True</s:Boolean>
+ <s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/QualifiedUsingAtNestedScope/@EntryValue">True</s:Boolean>
+ <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertClosureToMethodGroup/@EntryIndexedValue">DO_NOT_SHOW</s:String>
+ <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EXml_002ECodeStyle_002EFormatSettingsUpgrade_002EXmlMoveToCommonFormatterSettingsUpgrade/@EntryIndexedValue">True</s:Boolean>
+ <s:Boolean x:Key="/Default/Environment/UnitTesting/ShadowCopy/@EntryValue">False</s:Boolean>
+ <s:Boolean x:Key="/Default/UserDictionary/Words/=binarizable/@EntryIndexedValue">True</s:Boolean>
+ <s:Boolean x:Key="/Default/UserDictionary/Words/=cgroup/@EntryIndexedValue">True</s:Boolean>
+ <s:Boolean x:Key="/Default/UserDictionary/Words/=failover/@EntryIndexedValue">True</s:Boolean>
+ <s:Boolean x:Key="/Default/UserDictionary/Words/=Multithreaded/@EntryIndexedValue">True</s:Boolean>
+ <s:Boolean x:Key="/Default/UserDictionary/Words/=Reentrancy/@EntryIndexedValue">True</s:Boolean>
+ <s:Boolean x:Key="/Default/UserDictionary/Words/=reentrant/@EntryIndexedValue">True</s:Boolean>
+</wpf:ResourceDictionary>
\ No newline at end of file
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj
deleted file mode 100644
index 08390d7..0000000
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{069FA680-3C4D-43A9-B84F-E67513B87827}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Apache.Ignite.Examples</RootNamespace>
- <AssemblyName>Apache.Ignite.Examples</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup>
- <StartupObject>Apache.Ignite.Examples.Compute.TaskExample</StartupObject>
- </PropertyGroup>
- <PropertyGroup>
- <SignAssembly>true</SignAssembly>
- </PropertyGroup>
- <PropertyGroup>
- <AssemblyOriginatorKeyFile>Apache.Ignite.Examples.snk</AssemblyOriginatorKeyFile>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug\</OutputPath>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Release\</OutputPath>
- <Optimize>true</Optimize>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <PropertyGroup>
- <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Apache.Ignite.Core">
- <HintPath Condition="Exists('..\..\Apache.Ignite')">..\..\Apache.Ignite\bin\$(Configuration)\Apache.Ignite.Core.dll</HintPath>
- <HintPath Condition="Exists('..\..\bin\Apache.Ignite.Core.dll')">..\..\bin\Apache.Ignite.Core.dll</HintPath>
- </Reference>
- <Reference Include="Apache.Ignite.Linq">
- <HintPath Condition="Exists('..\..\Apache.Ignite.Linq')">..\..\Apache.Ignite.Linq\bin\$(Configuration)\Apache.Ignite.Linq.dll</HintPath>
- <HintPath Condition="Exists('..\..\bin\Apache.Ignite.Linq.dll')">..\..\bin\Apache.Ignite.Linq.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Transactions" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Sql\LinqExample.cs" />
- <Compile Include="Sql\SqlDdlExample.cs" />
- <Compile Include="Sql\SqlDmlExample.cs" />
- <Compile Include="Sql\SqlExample.cs" />
- <Compile Include="ThinClient\ThinClientPutGetExample.cs" />
- <Compile Include="ThinClient\ThinClientQueryExample.cs" />
- <Compile Include="Compute\ClosureExample.cs" />
- <Compile Include="Compute\TaskExample.cs" />
- <Compile Include="Compute\PeerAssemblyLoadingExample.cs" />
- <Compile Include="Datagrid\ContinuousQueryExample.cs" />
- <Compile Include="Datagrid\DataStreamerExample.cs" />
- <Compile Include="Datagrid\MultiTieredCacheExample.cs" />
- <Compile Include="Datagrid\EntryProcessorExample.cs" />
- <Compile Include="Datagrid\NearCacheExample.cs" />
- <Compile Include="Datagrid\OptimisticTransactionExample.cs" />
- <Compile Include="Datagrid\PutGetExample.cs" />
- <Compile Include="Datagrid\BinaryModeExample.cs" />
- <Compile Include="Datagrid\QueryExample.cs" />
- <Compile Include="Datagrid\StoreExample.cs" />
- <Compile Include="Datagrid\TransactionDeadlockDetectionExample.cs" />
- <Compile Include="Datagrid\TransactionExample.cs" />
- <Compile Include="DataStructures\AtomicLongExample.cs" />
- <Compile Include="DataStructures\AtomicReferenceExample.cs" />
- <Compile Include="DataStructures\AtomicSequenceExample.cs" />
- <Compile Include="Events\EventsExample.cs" />
- <Compile Include="Messaging\MessagingExample.cs" />
- <Compile Include="Misc\ClientReconnectExample.cs" />
- <Compile Include="Misc\LifecycleExample.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Services\IMapService.cs" />
- <Compile Include="Services\ServicesExample.cs" />
- <Compile Include="ThinClient\ThinClientSqlExample.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Apache.Ignite.ExamplesDll\Apache.Ignite.ExamplesDll.csproj">
- <Project>{dfb08363-202e-412d-8812-349ef10a8702}</Project>
- <Name>Apache.Ignite.ExamplesDll</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="Apache.Ignite.Examples.snk" />
- <None Include="App.config" />
- </ItemGroup>
- <ItemGroup />
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.snk b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.snk
deleted file mode 100644
index e1f913f..0000000
Binary files a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.snk and /dev/null differ
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/App.config b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/App.config
deleted file mode 100644
index 8f78382..0000000
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/App.config
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-
-<!--
- 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.
--->
-
-<configuration>
- <configSections>
- <section name="igniteConfiguration" type="Apache.Ignite.Core.IgniteConfigurationSection, Apache.Ignite.Core" />
- </configSections>
-
- <runtime>
- <gcServer enabled="true" />
- </runtime>
-
- <igniteConfiguration xmlns="http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection"
- localhost="127.0.0.1" peerAssemblyLoadingMode="CurrentAppDomain">
- <atomicConfiguration atomicSequenceReserveSize="10" />
-
- <discoverySpi type="TcpDiscoverySpi">
- <ipFinder type="TcpDiscoveryMulticastIpFinder">
- <endpoints>
- <string>127.0.0.1:47500..47502</string>
- </endpoints>
- </ipFinder>
- </discoverySpi>
- </igniteConfiguration>
-</configuration>
\ No newline at end of file
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/TaskExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/TaskExample.cs
deleted file mode 100644
index 71e76a9..0000000
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/TaskExample.cs
+++ /dev/null
@@ -1,134 +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.Examples.Compute
-{
- using System;
- using System.Collections.Generic;
- using Apache.Ignite.Core;
- using Apache.Ignite.ExamplesDll.Binary;
- using Apache.Ignite.ExamplesDll.Compute;
-
- /// <summary>
- /// Example demonstrating task execution.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
- /// </summary>
- public class TaskExample
- {
- /// <summary>
- /// Runs the example.
- /// </summary>
- [STAThread]
- public static void Main()
- {
- using (var ignite = Ignition.StartFromApplicationConfiguration())
- {
- Console.WriteLine();
- Console.WriteLine(">>> Task execution example started.");
-
- // Generate employees to calculate average salary for.
- ICollection<Employee> employees = Employees();
-
- Console.WriteLine();
- Console.WriteLine(">>> Calculating average salary for employees:");
-
- foreach (Employee employee in employees)
- Console.WriteLine(">>> " + employee);
-
- // Execute task and get average salary.
- var avgSalary = ignite.GetCompute().Execute(new AverageSalaryTask(), employees);
-
- Console.WriteLine();
- Console.WriteLine(">>> Average salary for all employees: " + avgSalary);
- Console.WriteLine();
- }
-
- Console.WriteLine();
- Console.WriteLine(">>> Example finished, press any key to exit ...");
- Console.ReadKey();
- }
-
- /// <summary>
- /// Generates collection of employees for example.
- /// </summary>
- /// <returns>Collection of employees.</returns>
- private static ICollection<Employee> Employees()
- {
- return new[]
- {
- new Employee(
- "James Wilson",
- 12500,
- new Address("1096 Eddy Street, San Francisco, CA", 94109),
- new List<string> {"Human Resources", "Customer Service"}
- ),
- new Employee(
- "Daniel Adams",
- 11000,
- new Address("184 Fidler Drive, San Antonio, TX", 78205),
- new List<string> {"Development", "QA"}
- ),
- new Employee(
- "Cristian Moss",
- 12500,
- new Address("667 Jerry Dove Drive, Florence, SC", 29501),
- new List<string> {"Logistics"}
- ),
- new Employee(
- "Allison Mathis",
- 25300,
- new Address("2702 Freedom Lane, Hornitos, CA", 95325),
- new List<string> {"Development"}
- ),
- new Employee(
- "Breana Robbin",
- 6500,
- new Address("3960 Sundown Lane, Austin, TX", 78758),
- new List<string> {"Sales"}
- ),
- new Employee(
- "Philip Horsley",
- 19800,
- new Address("2803 Elsie Drive, Sioux Falls, SD", 57104),
- new List<string> {"Sales"}
- ),
- new Employee(
- "Brian Peters",
- 10600,
- new Address("1407 Pearlman Avenue, Boston, MA", 02110),
- new List<string> {"Development", "QA"}
- ),
- new Employee(
- "Jack Yang",
- 12900,
- new Address("4425 Parrish Avenue Smithsons Valley, TX", 78130),
- new List<string> {"Sales"}
- )
- };
- }
- }
-}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs
deleted file mode 100644
index a059b5a..0000000
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs
+++ /dev/null
@@ -1,163 +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.Examples.Datagrid
-{
- using System;
- using Apache.Ignite.Core;
- using Apache.Ignite.Core.Cache;
- using Apache.Ignite.Core.Cache.Configuration;
- using Apache.Ignite.Core.Cache.Query;
- using Apache.Ignite.ExamplesDll.Binary;
- using Apache.Ignite.ExamplesDll.Datagrid;
-
- /// <summary>
- /// This example populates cache with sample data and runs Scan and Full-text queries.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
- /// </summary>
- public class QueryExample
- {
- /// <summary>Employee cache name.</summary>
- private const string EmployeeCacheName = "dotnet_cache_query_employee";
-
- [STAThread]
- public static void Main()
- {
- using (var ignite = Ignition.StartFromApplicationConfiguration())
- {
- Console.WriteLine();
- Console.WriteLine(">>> Cache query example started.");
-
- var employeeCache = ignite.GetOrCreateCache<int, Employee>(
- new CacheConfiguration(EmployeeCacheName, new QueryEntity(typeof(int), typeof(Employee))));
-
- // Populate cache with sample data entries.
- PopulateCache(employeeCache);
-
- // Run scan query example.
- ScanQueryExample(employeeCache);
-
- // Run full text query example.
- FullTextQueryExample(employeeCache);
-
- Console.WriteLine();
- }
-
- Console.WriteLine();
- Console.WriteLine(">>> Example finished, press any key to exit ...");
- Console.ReadKey();
- }
-
- /// <summary>
- /// Queries employees that have provided ZIP code in address.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void ScanQueryExample(ICache<int, Employee> cache)
- {
- const int zip = 94109;
-
- var qry = cache.Query(new ScanQuery<int, Employee>(new ScanQueryFilter(zip)));
-
- Console.WriteLine();
- Console.WriteLine(">>> Employees with zipcode {0} (scan):", zip);
-
- foreach (var entry in qry)
- Console.WriteLine(">>> " + entry.Value);
- }
-
- /// <summary>
- /// Queries employees that live in Texas using full-text query API.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void FullTextQueryExample(ICache<int, Employee> cache)
- {
- var qry = cache.Query(new TextQuery("Employee", "TX"));
-
- Console.WriteLine();
- Console.WriteLine(">>> Employees living in Texas:");
-
- foreach (var entry in qry)
- Console.WriteLine(">>> " + entry.Value);
- }
-
- /// <summary>
- /// Populate cache with data for this example.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void PopulateCache(ICache<int, Employee> cache)
- {
- cache.Put(1, new Employee(
- "James Wilson",
- 12500,
- new Address("1096 Eddy Street, San Francisco, CA", 94109),
- new[] {"Human Resources", "Customer Service"},
- 1));
-
- cache.Put(2, new Employee(
- "Daniel Adams",
- 11000,
- new Address("184 Fidler Drive, San Antonio, TX", 78130),
- new[] {"Development", "QA"},
- 1));
-
- cache.Put(3, new Employee(
- "Cristian Moss",
- 12500,
- new Address("667 Jerry Dove Drive, Florence, SC", 29501),
- new[] {"Logistics"},
- 1));
-
- cache.Put(4, new Employee(
- "Allison Mathis",
- 25300,
- new Address("2702 Freedom Lane, San Francisco, CA", 94109),
- new[] {"Development"},
- 2));
-
- cache.Put(5, new Employee(
- "Breana Robbin",
- 6500,
- new Address("3960 Sundown Lane, Austin, TX", 78130),
- new[] {"Sales"},
- 2));
-
- cache.Put(6, new Employee(
- "Philip Horsley",
- 19800,
- new Address("2803 Elsie Drive, Sioux Falls, SD", 57104),
- new[] {"Sales"},
- 2));
-
- cache.Put(7, new Employee(
- "Brian Peters",
- 10600,
- new Address("1407 Pearlman Avenue, Boston, MA", 12110),
- new[] {"Development", "QA"},
- 2));
- }
- }
-}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs
deleted file mode 100644
index 6728e38..0000000
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs
+++ /dev/null
@@ -1,110 +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.Examples.Messaging
-{
- using System;
- using System.Threading;
- using Apache.Ignite.Core;
- using Apache.Ignite.ExamplesDll.Messaging;
-
- /// <summary>
- /// Example demonstrating Ignite messaging. Should be run with standalone Apache Ignite.NET node.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder;
- /// 2) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 3) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 4) Start example (F5 or Ctrl+F5).
- /// </summary>
- public class MessagingExample
- {
- /// <summary>
- /// Runs the example.
- /// </summary>
- [STAThread]
- public static void Main()
- {
- using (var ignite = Ignition.StartFromApplicationConfiguration())
- {
- var remotes = ignite.GetCluster().ForRemotes();
-
- if (remotes.GetNodes().Count == 0)
- {
- Console.WriteLine(">>> This example requires remote nodes to be started.");
- Console.WriteLine(">>> Please start at least 1 remote node.");
- Console.WriteLine(">>> Refer to example's documentation for details on configuration.");
- }
- else
- {
- Console.WriteLine(">>> Messaging example started.");
- Console.WriteLine();
-
- // Set up local listeners
- var localMessaging = ignite.GetCluster().ForLocal().GetMessaging();
-
- var msgCount = remotes.GetNodes().Count * 10;
-
- var orderedCounter = new CountdownEvent(msgCount);
- var unorderedCounter = new CountdownEvent(msgCount);
-
- localMessaging.LocalListen(new LocalListener(unorderedCounter), Topic.Unordered);
-
- localMessaging.LocalListen(new LocalListener(orderedCounter), Topic.Ordered);
-
- // Set up remote listeners
- var remoteMessaging = remotes.GetMessaging();
-
- var idUnordered = remoteMessaging.RemoteListen(new RemoteUnorderedListener(), Topic.Unordered);
- var idOrdered = remoteMessaging.RemoteListen(new RemoteOrderedListener(), Topic.Ordered);
-
- // Send unordered
- Console.WriteLine(">>> Sending unordered messages...");
-
- for (var i = 0; i < 10; i++)
- remoteMessaging.Send(i, Topic.Unordered);
-
- Console.WriteLine(">>> Finished sending unordered messages.");
-
- // Send ordered
- Console.WriteLine(">>> Sending ordered messages...");
-
- for (var i = 0; i < 10; i++)
- remoteMessaging.SendOrdered(i, Topic.Ordered);
-
- Console.WriteLine(">>> Finished sending ordered messages.");
-
- Console.WriteLine(">>> Check output on all nodes for message printouts.");
- Console.WriteLine(">>> Waiting for messages acknowledgements from all remote nodes...");
-
- unorderedCounter.Wait();
- orderedCounter.Wait();
-
- // Unsubscribe
- remoteMessaging.StopRemoteListen(idUnordered);
- remoteMessaging.StopRemoteListen(idOrdered);
- }
- }
-
- Console.WriteLine();
- Console.WriteLine(">>> Example finished, press any key to exit ...");
- Console.ReadKey();
- }
- }
-}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
deleted file mode 100644
index 098b496..0000000
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,34 +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.
-*/
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyTitle("Apache Ignite.NET Examples")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Apache Ignite.NET")]
-[assembly: AssemblyCopyright("Copyright 2021")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-[assembly: ComVisible(false)]
-
-[assembly: Guid("41a0cb95-3435-4c78-b867-900b28e2c9ee")]
-
-[assembly: AssemblyVersion("1.0.*")]
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/IMapService.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/IMapService.cs
deleted file mode 100644
index 4e2b883..0000000
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/IMapService.cs
+++ /dev/null
@@ -1,56 +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.Examples.Services
-{
- using Apache.Ignite.ExamplesDll.Services;
-
- /// <summary>
- /// Interface for service proxy interaction.
- /// Actual service class (<see cref="MapService{TK,TV}"/>) does not have to implement this interface.
- /// Target method/property will be searched by signature (name, arguments).
- /// </summary>
- public interface IMapService<TK, TV>
- {
- /// <summary>
- /// Puts an entry to the map.
- /// </summary>
- /// <param name="key">The key.</param>
- /// <param name="value">The value.</param>
- void Put(TK key, TV value);
-
- /// <summary>
- /// Gets an entry from the map.
- /// </summary>
- /// <param name="key">The key.</param>
- /// <returns>Entry value.</returns>
- TV Get(TK key);
-
- /// <summary>
- /// Clears the map.
- /// </summary>
- void Clear();
-
- /// <summary>
- /// Gets the size of the map.
- /// </summary>
- /// <value>
- /// The size.
- /// </value>
- int Size { get; }
- }
-}
\ No newline at end of file
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/ThinClient/ThinClientPutGetExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/ThinClient/ThinClientPutGetExample.cs
deleted file mode 100644
index 395ac1c..0000000
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/ThinClient/ThinClientPutGetExample.cs
+++ /dev/null
@@ -1,89 +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.Examples.ThinClient
-{
- using System;
- using Apache.Ignite.Core;
- using Apache.Ignite.Core.Client;
- using Apache.Ignite.Core.Client.Cache;
- using Apache.Ignite.ExamplesDll.Binary;
-
- /// <summary>
- /// Demonstrates Ignite.NET "thin" client cache operations.
- /// <para />
- /// 1) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 2) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example must be run with standalone Apache Ignite node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config
- /// 2) Start example.
- /// <para />
- /// This example can also work via pure Java node started with ignite.bat/ignite.sh.
- /// </summary>
- public static class ThinClientPutGetExample
- {
- /// <summary> Cache name. </summary>
- private const string CacheName = "thinClientCache";
-
- [STAThread]
- public static void Main()
- {
- var cfg = new IgniteClientConfiguration("127.0.0.1");
-
- using (IIgniteClient igniteClient = Ignition.StartClient(cfg))
- {
- Console.WriteLine();
- Console.WriteLine(">>> Cache put-get client example started.");
-
- ICacheClient<int, Organization> cache = igniteClient.GetOrCreateCache<int, Organization>(CacheName);
-
- PutGet(cache);
- }
-
- Console.WriteLine();
- Console.WriteLine(">>> Example finished, press any key to exit ...");
- Console.ReadKey();
- }
-
- /// <summary>
- /// Execute individual Put and Get.
- /// </summary>
- /// <param name="cache">Cache instance.</param>
- private static void PutGet(ICacheClient<int, Organization> cache)
- {
- // Create new Organization to store in cache.
- Organization org = new Organization(
- "Microsoft",
- new Address("1096 Eddy Street, San Francisco, CA", 94109),
- OrganizationType.Private,
- DateTime.Now
- );
-
- // Put created data entry to cache.
- cache.Put(1, org);
-
- // Get recently created employee as a strongly-typed fully de-serialized instance.
- Organization orgFromCache = cache.Get(1);
-
- Console.WriteLine();
- Console.WriteLine(">>> Retrieved organization instance from cache: " + orgFromCache);
- }
- }
-}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/ThinClient/ThinClientQueryExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/ThinClient/ThinClientQueryExample.cs
deleted file mode 100644
index f802087..0000000
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/ThinClient/ThinClientQueryExample.cs
+++ /dev/null
@@ -1,144 +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.Examples.ThinClient
-{
- using System;
- using Apache.Ignite.Core;
- using Apache.Ignite.Core.Cache.Query;
- using Apache.Ignite.Core.Client;
- using Apache.Ignite.Core.Client.Cache;
- using Apache.Ignite.ExamplesDll.Binary;
- using Apache.Ignite.ExamplesDll.Datagrid;
-
- /// <summary>
- /// Demonstrates Ignite.NET "thin" client cache queries.
- /// <para />
- /// 1) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 2) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example must be run with standalone Apache Ignite node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
- /// </summary>
- public class ThinClientQueryExample
- {
- /// <summary> Cache name. </summary>
- private const string CacheName = "thinClientCache";
-
- [STAThread]
- public static void Main()
- {
- var cfg = new IgniteClientConfiguration("127.0.0.1");
-
- using (IIgniteClient igniteClient = Ignition.StartClient(cfg))
- {
- Console.WriteLine();
- Console.WriteLine(">>> Cache query client example started.");
-
- ICacheClient<int, Employee> cache = igniteClient.GetOrCreateCache<int, Employee>(CacheName);
-
- // Populate cache with sample data entries.
- PopulateCache(cache);
-
- // Run scan query example.
- ScanQueryExample(cache);
- }
-
- Console.WriteLine();
- Console.WriteLine(">>> Example finished, press any key to exit ...");
- Console.ReadKey();
- }
-
- /// <summary>
- /// Queries organizations of specified type.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void ScanQueryExample(ICacheClient<int, Employee> cache)
- {
- const int zip = 94109;
-
- var qry = cache.Query(new ScanQuery<int, Employee>(new ScanQueryFilter(zip)));
-
- Console.WriteLine();
- Console.WriteLine(">>> Private organizations (scan):");
-
- foreach (var entry in qry)
- {
- Console.WriteLine(">>> " + entry.Value);
- }
- }
-
- /// <summary>
- /// Populate cache with data for this example.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void PopulateCache(ICacheClient<int, Employee> cache)
- {
- cache.Put(1, new Employee(
- "James Wilson",
- 12500,
- new Address("1096 Eddy Street, San Francisco, CA", 94109),
- new[] { "Human Resources", "Customer Service" },
- 1));
-
- cache.Put(2, new Employee(
- "Daniel Adams",
- 11000,
- new Address("184 Fidler Drive, San Antonio, TX", 78130),
- new[] { "Development", "QA" },
- 1));
-
- cache.Put(3, new Employee(
- "Cristian Moss",
- 12500,
- new Address("667 Jerry Dove Drive, Florence, SC", 29501),
- new[] { "Logistics" },
- 1));
-
- cache.Put(4, new Employee(
- "Allison Mathis",
- 25300,
- new Address("2702 Freedom Lane, San Francisco, CA", 94109),
- new[] { "Development" },
- 2));
-
- cache.Put(5, new Employee(
- "Breana Robbin",
- 6500,
- new Address("3960 Sundown Lane, Austin, TX", 78130),
- new[] { "Sales" },
- 2));
-
- cache.Put(6, new Employee(
- "Philip Horsley",
- 19800,
- new Address("2803 Elsie Drive, Sioux Falls, SD", 57104),
- new[] { "Sales" },
- 2));
-
- cache.Put(7, new Employee(
- "Brian Peters",
- 10600,
- new Address("1407 Pearlman Avenue, Boston, MA", 12110),
- new[] { "Development", "QA" },
- 2));
- }
- }
-}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/ThinClient/ThinClientSqlExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/ThinClient/ThinClientSqlExample.cs
deleted file mode 100644
index 70b5176..0000000
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/ThinClient/ThinClientSqlExample.cs
+++ /dev/null
@@ -1,198 +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.Examples.ThinClient
-{
- using System;
- using System.Linq;
- using Apache.Ignite.Core;
- using Apache.Ignite.Core.Cache;
- using Apache.Ignite.Core.Cache.Configuration;
- using Apache.Ignite.Core.Cache.Query;
- using Apache.Ignite.Core.Client;
- using Apache.Ignite.Core.Client.Cache;
- using Apache.Ignite.ExamplesDll.Binary;
- using Apache.Ignite.Linq;
-
- /// <summary>
- /// Demonstrates Ignite.NET "thin" client SQL queries.
- /// <para />
- /// 1) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 2) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example must be run with standalone Apache Ignite node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config
- /// 2) Start example.
- /// <para />
- /// This example can also work via pure Java node started with ignite.bat/ignite.sh.
- /// </summary>
- public class ThinClientSqlExample
- {
- /// <summary> Cache name. </summary>
- private const string CacheName = "thinClientSqlCache";
-
- [STAThread]
- public static void Main()
- {
- var cfg = new IgniteClientConfiguration("127.0.0.1");
-
- using (IIgniteClient igniteClient = Ignition.StartClient(cfg))
- {
- Console.WriteLine();
- Console.WriteLine(">>> Cache query client example started.");
-
- // Configure query entities to enable SQL.
- var cacheCfg = new CacheClientConfiguration
- {
- Name = CacheName,
- QueryEntities = new[]
- {
- new QueryEntity(typeof(int), typeof(Employee)),
- }
- };
-
- ICacheClient<int, Employee> cache = igniteClient.GetOrCreateCache<int, Employee>(cacheCfg);
-
- // Populate cache with sample data entries.
- PopulateCache(cache);
-
- // Run examples.
- SqlExample(cache);
- LinqExample(cache);
- LinqFieldsExample(cache);
- }
-
- Console.WriteLine();
- Console.WriteLine(">>> Example finished, press any key to exit ...");
- Console.ReadKey();
- }
-
- /// <summary>
- /// Queries names and salaries for all employees.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void SqlExample(ICacheClient<int, Employee> cache)
- {
- var qry = cache.Query(new SqlFieldsQuery("select name, salary from Employee"));
-
- Console.WriteLine();
- Console.WriteLine(">>> Employee names and their salaries (SQL):");
-
- foreach (var row in qry)
- Console.WriteLine(">>> [Name=" + row[0] + ", salary=" + row[1] + ']');
- }
-
- /// <summary>
- /// Queries employees that have provided ZIP code in address.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void LinqExample(ICacheClient<int, Employee> cache)
- {
- const int zip = 94109;
-
- IQueryable<ICacheEntry<int, Employee>> qry =
- cache.AsCacheQueryable().Where(emp => emp.Value.Address.Zip == zip);
-
- Console.WriteLine();
- Console.WriteLine(">>> Employees with zipcode " + zip + " (LINQ):");
-
- foreach (ICacheEntry<int, Employee> entry in qry)
- Console.WriteLine(">>> " + entry.Value);
-
- Console.WriteLine();
- Console.WriteLine(">>> Generated SQL:");
- Console.WriteLine(">>> " + qry.ToCacheQueryable().GetFieldsQuery().Sql);
- }
-
- /// <summary>
- /// Queries names and salaries for all employees.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void LinqFieldsExample(ICacheClient<int, Employee> cache)
- {
- var qry = cache.AsCacheQueryable().Select(entry => new {entry.Value.Name, entry.Value.Salary});
-
- Console.WriteLine();
- Console.WriteLine(">>> Employee names and their salaries (LINQ):");
-
- foreach (var row in qry)
- Console.WriteLine(">>> [Name=" + row.Name + ", salary=" + row.Salary + ']');
-
- Console.WriteLine();
- Console.WriteLine(">>> Generated SQL:");
- Console.WriteLine(">>> " + qry.ToCacheQueryable().GetFieldsQuery().Sql);
- }
-
- /// <summary>
- /// Populate cache with data for this example.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void PopulateCache(ICacheClient<int, Employee> cache)
- {
- cache.Put(1, new Employee(
- "James Wilson",
- 12500,
- new Address("1096 Eddy Street, San Francisco, CA", 94109),
- new[] { "Human Resources", "Customer Service" },
- 1));
-
- cache.Put(2, new Employee(
- "Daniel Adams",
- 11000,
- new Address("184 Fidler Drive, San Antonio, TX", 78130),
- new[] { "Development", "QA" },
- 1));
-
- cache.Put(3, new Employee(
- "Cristian Moss",
- 12500,
- new Address("667 Jerry Dove Drive, Florence, SC", 29501),
- new[] { "Logistics" },
- 1));
-
- cache.Put(4, new Employee(
- "Allison Mathis",
- 25300,
- new Address("2702 Freedom Lane, San Francisco, CA", 94109),
- new[] { "Development" },
- 2));
-
- cache.Put(5, new Employee(
- "Breana Robbin",
- 6500,
- new Address("3960 Sundown Lane, Austin, TX", 78130),
- new[] { "Sales" },
- 2));
-
- cache.Put(6, new Employee(
- "Philip Horsley",
- 19800,
- new Address("2803 Elsie Drive, Sioux Falls, SD", 57104),
- new[] { "Sales" },
- 2));
-
- cache.Put(7, new Employee(
- "Brian Peters",
- 10600,
- new Address("1407 Pearlman Avenue, Boston, MA", 12110),
- new[] { "Development", "QA" },
- 2));
- }
- }
-}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
deleted file mode 100644
index 6ea6227..0000000
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{DFB08363-202E-412D-8812-349EF10A8702}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Apache.Ignite.ExamplesDll</RootNamespace>
- <AssemblyName>Apache.Ignite.ExamplesDll</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <NoWarn>649</NoWarn>
- </PropertyGroup>
- <PropertyGroup>
- <SignAssembly>true</SignAssembly>
- </PropertyGroup>
- <PropertyGroup>
- <AssemblyOriginatorKeyFile>Apache.Ignite.ExamplesDll.snk</AssemblyOriginatorKeyFile>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug\</OutputPath>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Release\</OutputPath>
- <Optimize>true</Optimize>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <PropertyGroup>
- <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Apache.Ignite.Core">
- <HintPath Condition="Exists('..\..\Apache.Ignite')">..\..\Apache.Ignite\bin\$(Configuration)\Apache.Ignite.Core.dll</HintPath>
- <HintPath Condition="Exists('..\..\bin\Apache.Ignite.Core.dll')">..\..\bin\Apache.Ignite.Core.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Compute\AverageSalaryJob.cs" />
- <Compile Include="Compute\AverageSalaryTask.cs" />
- <Compile Include="Compute\CharacterCountClosure.cs" />
- <Compile Include="Compute\CharacterCountReducer.cs" />
- <Compile Include="Datagrid\CacheIncrementEntryProcessor.cs" />
- <Compile Include="Datagrid\CachePutEntryProcessor.cs" />
- <Compile Include="Datagrid\EmployeeStoreFactory.cs" />
- <Compile Include="Datagrid\EmployeeStorePredicate.cs" />
- <Compile Include="Datagrid\ContinuousQueryFilter.cs" />
- <Compile Include="Datagrid\EmployeeStore.cs" />
- <Compile Include="Datagrid\ScanQueryFilter.cs" />
- <Compile Include="DataStructures\AtomicReferenceModifyAction.cs" />
- <Compile Include="DataStructures\AtomicSequenceIncrementAction.cs" />
- <Compile Include="DataStructures\AtomicLongIncrementAction.cs" />
- <Compile Include="Events\LocalListener.cs" />
- <Compile Include="Messaging\LocalListener.cs" />
- <Compile Include="Messaging\RemoteOrderedListener.cs" />
- <Compile Include="Messaging\RemoteUnorderedListener.cs" />
- <Compile Include="Messaging\Topic.cs" />
- <Compile Include="Binary\Account.cs" />
- <Compile Include="Binary\Address.cs" />
- <Compile Include="Binary\Employee.cs" />
- <Compile Include="Binary\Organization.cs" />
- <Compile Include="Binary\OrganizationType.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Services\MapService.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="Apache.Ignite.ExamplesDll.snk" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.snk b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.snk
deleted file mode 100644
index 7887c27..0000000
Binary files a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.snk and /dev/null differ
diff --git a/modules/platforms/dotnet/examples/Directory.Build.props b/modules/platforms/dotnet/examples/Directory.Build.props
new file mode 100644
index 0000000..2e12970
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Directory.Build.props
@@ -0,0 +1,42 @@
+<!--
+ 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.
+-->
+
+<Project>
+ <PropertyGroup Condition="Exists('$(MSBuildThisFileDirectory)..\bin\Apache.Ignite.Core.dll')">
+ <IgniteBinaryDistro>true</IgniteBinaryDistro>
+ </PropertyGroup>
+
+ <!-- Dev mode is enabled when sources are present and were built. -->
+ <PropertyGroup Condition="Exists('$(MSBuildThisFileDirectory)..\Apache.Ignite.Core\Ignition.cs') And Exists('$(MSBuildThisFileDirectory)..\Apache.Ignite.Core\bin')">
+ <IgniteDevMode>true</IgniteDevMode>
+ </PropertyGroup>
+
+ <ItemGroup Condition="$(IgniteDevMode) == 'true'">
+ <ProjectReference Include="$(MSBuildThisFileDirectory)..\Apache.Ignite.Core\Apache.Ignite.Core.DotNetCore.csproj" />
+ <ProjectReference Include="$(MSBuildThisFileDirectory)..\Apache.Ignite.Linq\Apache.Ignite.Linq.DotNetCore.csproj" />
+ </ItemGroup>
+
+ <ItemGroup Condition="$(IgniteBinaryDistro) == 'true' And $(IgniteDevMode) == ''">
+ <Reference Include="Apache.Ignite.Core">
+ <HintPath>$(MSBuildThisFileDirectory)..\bin\Apache.Ignite.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="Apache.Ignite.Linq">
+ <HintPath>$(MSBuildThisFileDirectory)..\bin\Apache.Ignite.Linq.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/README.md b/modules/platforms/dotnet/examples/README.md
new file mode 100644
index 0000000..7ccb5a9
--- /dev/null
+++ b/modules/platforms/dotnet/examples/README.md
@@ -0,0 +1,57 @@
+# Ignite.NET Examples
+
+* Examples are grouped by Thick and Thin modes in corresponding folders.
+* `Shared` project contains common code, such as configuration and model classes.
+* `ServerNode` project is used to start Ignite server nodes.
+
+# Requirements
+
+* [.NET Core 2.1+](https://dotnet.microsoft.com/download/dotnet-core)
+* [JDK 8](https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html) or [JDK 11](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html)
+
+Windows, Linux, and macOS are supported.
+
+# Download Examples
+
+* NuGet:
+ * `dotnet new --install Apache.Ignite.Examples`
+ * `dotnet new ignite-examples`
+* Ignite website: https://ignite.apache.org/download.cgi
+* git: `git clone https://github.com/apache/ignite --depth=1`, `cd ignite/modules/platforms/dotnet/examples`
+
+# Run Examples
+
+## Command Line
+
+* Change to a specific example directory: `cd Thick/Cache/PutGet`
+* `dotnet run`
+
+Thin Client examples require one or mode Ignite server node, run this in a separate terminal window before starting the example:
+* `cd ServerNode`
+* `dotnet run`
+
+## Visual Studio
+
+* Open `Apache.Ignite.Examples.sln`
+* Select an example on the Run toolbar and run
+
+![Visual Studio Screenshot](images/vs.png)
+
+## VS Code
+
+* Open current folder (from UI or with `code .` command)
+* Open "Run" panel (`Ctrl+Shift+D` - default shortcut for `workbench.view.debug`)
+* Select an example from the combobox on top and run
+
+![VS Code Screenshot](images/vs-code.png)
+
+## Rider
+
+* Open `Apache.Ignite.Examples.sln`
+* Select an example on the Run toolbar and run
+
+![Rider Toolbar Screenshot](images/rider.png)
+
+* Alternatively, open the example source code an run it using the sidebar icon
+
+![Rider Sidebar Screenshot](images/rider-sidebar.png)
diff --git a/modules/platforms/dotnet/examples/README.txt b/modules/platforms/dotnet/examples/README.txt
deleted file mode 100644
index db38a35..0000000
--- a/modules/platforms/dotnet/examples/README.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Apache Ignite.NET Examples
-==================================
-
-Windows-only. See dotnetcore folder for cross-platform .NET-core based examples.
-
- * Open Visual Studio solution %IGNITE_HOME%\platforms\dotnet\examples\Apache.Ignite.Examples.sln
- * Build Apache.Ignite.ExamplesDll project.
- * Set desired example as startup object in Apache.Ignite.Examples project and run it.
\ No newline at end of file
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStoreFactory.cs b/modules/platforms/dotnet/examples/ServerNode/Program.cs
similarity index 62%
copy from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStoreFactory.cs
copy to modules/platforms/dotnet/examples/ServerNode/Program.cs
index 643fc44..d8dcd5e 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStoreFactory.cs
+++ b/modules/platforms/dotnet/examples/ServerNode/Program.cs
@@ -15,24 +15,25 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Datagrid
+namespace Apache.Ignite.Examples.ServerNode
{
using System;
- using Apache.Ignite.Core.Cache.Store;
- using Apache.Ignite.Core.Common;
+ using Apache.Ignite.Core;
+ using Apache.Ignite.Examples.Shared;
- /// <summary>
- /// Employee store factory.
- /// </summary>
- [Serializable]
- public class EmployeeStoreFactory : IFactory<ICacheStore>
+ public static class Program
{
- /// <summary>
- /// Creates an instance of the cache store.
- /// </summary>
- public ICacheStore CreateInstance()
+ public static void Main()
{
- return new EmployeeStore();
+ using (var ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
+ {
+ Utils.DeployDefaultServices(ignite);
+
+ Console.WriteLine();
+ Console.WriteLine(">>> Server node started, press any key to exit ...");
+
+ Console.ReadKey();
+ }
}
}
}
diff --git a/modules/platforms/dotnet/examples/ServerNode/ServerNode.csproj b/modules/platforms/dotnet/examples/ServerNode/ServerNode.csproj
new file mode 100644
index 0000000..7ab7492
--- /dev/null
+++ b/modules/platforms/dotnet/examples/ServerNode/ServerNode.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.ServerNode</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/CacheIncrementEntryProcessor.cs b/modules/platforms/dotnet/examples/Shared/Cache/CacheIncrementEntryProcessor.cs
similarity index 93%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/CacheIncrementEntryProcessor.cs
rename to modules/platforms/dotnet/examples/Shared/Cache/CacheIncrementEntryProcessor.cs
index 7359508..e8ad89c 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/CacheIncrementEntryProcessor.cs
+++ b/modules/platforms/dotnet/examples/Shared/Cache/CacheIncrementEntryProcessor.cs
@@ -15,13 +15,13 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Datagrid
+namespace Apache.Ignite.Examples.Shared.Cache
{
using System;
using Apache.Ignite.Core.Cache;
/// <summary>
- /// EntryProocessor that increments cached values.
+ /// EntryProcessor that increments cached values.
/// </summary>
[Serializable]
public class CacheIncrementEntryProcessor : ICacheEntryProcessor<int, int, int, object>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/CachePutEntryProcessor.cs b/modules/platforms/dotnet/examples/Shared/Cache/CachePutEntryProcessor.cs
similarity index 97%
copy from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/CachePutEntryProcessor.cs
copy to modules/platforms/dotnet/examples/Shared/Cache/CachePutEntryProcessor.cs
index 96f8f5f..b5f5694 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/CachePutEntryProcessor.cs
+++ b/modules/platforms/dotnet/examples/Shared/Cache/CachePutEntryProcessor.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Datagrid
+namespace Apache.Ignite.Examples.Shared.Cache
{
using System;
using Apache.Ignite.Core.Cache;
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/ContinuousQueryFilter.cs b/modules/platforms/dotnet/examples/Shared/Cache/ContinuousQueryFilter.cs
similarity index 97%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/ContinuousQueryFilter.cs
rename to modules/platforms/dotnet/examples/Shared/Cache/ContinuousQueryFilter.cs
index e8d4fd3..0cdd9d1 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/ContinuousQueryFilter.cs
+++ b/modules/platforms/dotnet/examples/Shared/Cache/ContinuousQueryFilter.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Datagrid
+namespace Apache.Ignite.Examples.Shared.Cache
{
using Apache.Ignite.Core.Cache.Event;
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStore.cs b/modules/platforms/dotnet/examples/Shared/Cache/EmployeeStore.cs
similarity index 94%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStore.cs
rename to modules/platforms/dotnet/examples/Shared/Cache/EmployeeStore.cs
index 9eb6539..291418c 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStore.cs
+++ b/modules/platforms/dotnet/examples/Shared/Cache/EmployeeStore.cs
@@ -15,14 +15,14 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Datagrid
+namespace Apache.Ignite.Examples.Shared.Cache
{
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cache.Store;
- using Apache.Ignite.ExamplesDll.Binary;
+ using Apache.Ignite.Examples.Shared.Models;
/// <summary>
/// Example cache store implementation.
@@ -89,9 +89,7 @@ namespace Apache.Ignite.ExamplesDll.Datagrid
/// <returns>Loaded value</returns>
public override Employee Load(int key)
{
- Employee val;
-
- _db.TryGetValue(key, out val);
+ _db.TryGetValue(key, out var val);
return val;
}
@@ -112,9 +110,7 @@ namespace Apache.Ignite.ExamplesDll.Datagrid
/// <param name="key">Key to delete.</param>
public override void Delete(int key)
{
- Employee val;
-
- _db.TryRemove(key, out val);
+ _db.TryRemove(key, out _);
}
}
}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStoreFactory.cs b/modules/platforms/dotnet/examples/Shared/Cache/EmployeeStoreFactory.cs
similarity index 96%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStoreFactory.cs
rename to modules/platforms/dotnet/examples/Shared/Cache/EmployeeStoreFactory.cs
index 643fc44..5217899 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStoreFactory.cs
+++ b/modules/platforms/dotnet/examples/Shared/Cache/EmployeeStoreFactory.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Datagrid
+namespace Apache.Ignite.Examples.Shared.Cache
{
using System;
using Apache.Ignite.Core.Cache.Store;
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStorePredicate.cs b/modules/platforms/dotnet/examples/Shared/Cache/EmployeeStorePredicate.cs
similarity index 93%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStorePredicate.cs
rename to modules/platforms/dotnet/examples/Shared/Cache/EmployeeStorePredicate.cs
index 1df7630..f5fb962 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/EmployeeStorePredicate.cs
+++ b/modules/platforms/dotnet/examples/Shared/Cache/EmployeeStorePredicate.cs
@@ -15,10 +15,10 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Datagrid
+namespace Apache.Ignite.Examples.Shared.Cache
{
using Apache.Ignite.Core.Cache;
- using Apache.Ignite.ExamplesDll.Binary;
+ using Apache.Ignite.Examples.Shared.Models;
/// <summary>
/// Example cache entry predicate.
@@ -35,4 +35,4 @@ namespace Apache.Ignite.ExamplesDll.Datagrid
return entry.Key == 1;
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/ScanQueryFilter.cs b/modules/platforms/dotnet/examples/Shared/Cache/ScanQueryFilter.cs
similarity index 94%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/ScanQueryFilter.cs
rename to modules/platforms/dotnet/examples/Shared/Cache/ScanQueryFilter.cs
index 369b5d0..2a6d8b9 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Datagrid/ScanQueryFilter.cs
+++ b/modules/platforms/dotnet/examples/Shared/Cache/ScanQueryFilter.cs
@@ -15,12 +15,12 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Datagrid
+namespace Apache.Ignite.Examples.Shared.Cache
{
using System;
using Apache.Ignite.Core.Cache;
- using Apache.Ignite.ExamplesDll.Binary;
-
+ using Apache.Ignite.Examples.Shared.Models;
+
/// <summary>
/// Filter for scan query example.
/// </summary>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Compute/AverageSalaryJob.cs b/modules/platforms/dotnet/examples/Shared/Compute/AverageSalaryJob.cs
similarity index 95%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Compute/AverageSalaryJob.cs
rename to modules/platforms/dotnet/examples/Shared/Compute/AverageSalaryJob.cs
index 491f3c1..b6389a6 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Compute/AverageSalaryJob.cs
+++ b/modules/platforms/dotnet/examples/Shared/Compute/AverageSalaryJob.cs
@@ -15,12 +15,12 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Compute
+namespace Apache.Ignite.Examples.Shared.Compute
{
using System;
using System.Collections;
using Apache.Ignite.Core.Compute;
- using Apache.Ignite.ExamplesDll.Binary;
+ using Apache.Ignite.Examples.Shared.Models;
/// <summary>
/// Average salary job.
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Compute/AverageSalaryTask.cs b/modules/platforms/dotnet/examples/Shared/Compute/AverageSalaryTask.cs
similarity index 96%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Compute/AverageSalaryTask.cs
rename to modules/platforms/dotnet/examples/Shared/Compute/AverageSalaryTask.cs
index 6ef9798..85ef637 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Compute/AverageSalaryTask.cs
+++ b/modules/platforms/dotnet/examples/Shared/Compute/AverageSalaryTask.cs
@@ -15,13 +15,13 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Compute
+namespace Apache.Ignite.Examples.Shared.Compute
{
using System;
using System.Collections.Generic;
using System.Linq;
using Apache.Ignite.Core.Compute;
- using Apache.Ignite.ExamplesDll.Binary;
+ using Apache.Ignite.Examples.Shared.Models;
/// <summary>
/// Average salary task.
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Compute/CharacterCountClosure.cs b/modules/platforms/dotnet/examples/Shared/Compute/CharacterCountFunc.cs
similarity index 92%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Compute/CharacterCountClosure.cs
rename to modules/platforms/dotnet/examples/Shared/Compute/CharacterCountFunc.cs
index 9d407cf..2128b4e 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Compute/CharacterCountClosure.cs
+++ b/modules/platforms/dotnet/examples/Shared/Compute/CharacterCountFunc.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Compute
+namespace Apache.Ignite.Examples.Shared.Compute
{
using System;
using Apache.Ignite.Core.Compute;
@@ -23,7 +23,7 @@ namespace Apache.Ignite.ExamplesDll.Compute
/// <summary>
/// Closure counting characters in a string.
/// </summary>
- public class CharacterCountClosure : IComputeFunc<string, int>
+ public class CharacterCountFunc : IComputeFunc<string, int>
{
/// <summary>
/// Calculate character count of the given word.
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Compute/CharacterCountReducer.cs b/modules/platforms/dotnet/examples/Shared/Compute/CharacterCountReducer.cs
similarity index 97%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Compute/CharacterCountReducer.cs
rename to modules/platforms/dotnet/examples/Shared/Compute/CharacterCountReducer.cs
index 9ebf7eb5..f9ae685 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Compute/CharacterCountReducer.cs
+++ b/modules/platforms/dotnet/examples/Shared/Compute/CharacterCountReducer.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Compute
+namespace Apache.Ignite.Examples.Shared.Compute
{
using Apache.Ignite.Core.Compute;
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/DataStructures/AtomicLongIncrementAction.cs b/modules/platforms/dotnet/examples/Shared/DataStructures/AtomicLongIncrementAction.cs
similarity index 96%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/DataStructures/AtomicLongIncrementAction.cs
rename to modules/platforms/dotnet/examples/Shared/DataStructures/AtomicLongIncrementAction.cs
index 713d8bf..9ee1c05 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/DataStructures/AtomicLongIncrementAction.cs
+++ b/modules/platforms/dotnet/examples/Shared/DataStructures/AtomicLongIncrementAction.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.DataStructures
+namespace Apache.Ignite.Examples.Shared.DataStructures
{
using System;
using Apache.Ignite.Core;
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/DataStructures/AtomicReferenceModifyAction.cs b/modules/platforms/dotnet/examples/Shared/DataStructures/AtomicReferenceModifyAction.cs
similarity index 95%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/DataStructures/AtomicReferenceModifyAction.cs
rename to modules/platforms/dotnet/examples/Shared/DataStructures/AtomicReferenceModifyAction.cs
index 36aea7e..155924d 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/DataStructures/AtomicReferenceModifyAction.cs
+++ b/modules/platforms/dotnet/examples/Shared/DataStructures/AtomicReferenceModifyAction.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.DataStructures
+namespace Apache.Ignite.Examples.Shared.DataStructures
{
using System;
using Apache.Ignite.Core;
@@ -55,7 +55,7 @@ namespace Apache.Ignite.ExamplesDll.DataStructures
if (originalValue == expectedValue)
Console.WriteLine(">>> Successfully updated atomic reference on node {0}", localNodeId);
else
- Console.WriteLine(">>> Failed to update atomic reference on node {0}, actual value is {1}",
+ Console.WriteLine(">>> Failed to update atomic reference on node {0}, actual value is {1}",
localNodeId, originalValue);
}
}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/DataStructures/AtomicSequenceIncrementAction.cs b/modules/platforms/dotnet/examples/Shared/DataStructures/AtomicSequenceIncrementAction.cs
similarity index 96%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/DataStructures/AtomicSequenceIncrementAction.cs
rename to modules/platforms/dotnet/examples/Shared/DataStructures/AtomicSequenceIncrementAction.cs
index 0256795..892dfaa 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/DataStructures/AtomicSequenceIncrementAction.cs
+++ b/modules/platforms/dotnet/examples/Shared/DataStructures/AtomicSequenceIncrementAction.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.DataStructures
+namespace Apache.Ignite.Examples.Shared.DataStructures
{
using System;
using Apache.Ignite.Core;
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Events/LocalListener.cs b/modules/platforms/dotnet/examples/Shared/Events/LocalEventListener.cs
similarity index 94%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Events/LocalListener.cs
rename to modules/platforms/dotnet/examples/Shared/Events/LocalEventListener.cs
index 77af7a9..cc75250 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Events/LocalListener.cs
+++ b/modules/platforms/dotnet/examples/Shared/Events/LocalEventListener.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Events
+namespace Apache.Ignite.Examples.Shared.Events
{
using System;
using System.Threading;
@@ -24,7 +24,7 @@ namespace Apache.Ignite.ExamplesDll.Events
/// <summary>
/// Local event listener.
/// </summary>
- public class LocalListener : IEventListener<IEvent>
+ public class LocalEventListener : IEventListener<IEvent>
{
/** Count of received events. */
private int _eventsReceived;
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Messaging/LocalListener.cs b/modules/platforms/dotnet/examples/Shared/Messaging/LocalMessageListener.cs
similarity index 86%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Messaging/LocalListener.cs
rename to modules/platforms/dotnet/examples/Shared/Messaging/LocalMessageListener.cs
index e8b2f4b..4caef1b 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Messaging/LocalListener.cs
+++ b/modules/platforms/dotnet/examples/Shared/Messaging/LocalMessageListener.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Messaging
+namespace Apache.Ignite.Examples.Shared.Messaging
{
using System;
using System.Threading;
@@ -24,16 +24,16 @@ namespace Apache.Ignite.ExamplesDll.Messaging
/// <summary>
/// Local message listener which signals countdown event on each received message.
/// </summary>
- public class LocalListener : IMessageListener<int>
+ public class LocalMessageListener : IMessageListener<int>
{
/** Countdown event. */
private readonly CountdownEvent _countdown;
/// <summary>
- /// Initializes a new instance of the <see cref="LocalListener"/> class.
+ /// Initializes a new instance of the <see cref="LocalMessageListener"/> class.
/// </summary>
/// <param name="countdown">The countdown event.</param>
- public LocalListener(CountdownEvent countdown)
+ public LocalMessageListener(CountdownEvent countdown)
{
if (countdown == null)
throw new ArgumentNullException("countdown");
@@ -42,7 +42,7 @@ namespace Apache.Ignite.ExamplesDll.Messaging
}
/// <summary>
- /// Receives a message and returns a value
+ /// Receives a message and returns a value
/// indicating whether provided message and node id satisfy this predicate.
/// Returning false will unsubscribe this listener from future notifications.
/// </summary>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Messaging/RemoteOrderedListener.cs b/modules/platforms/dotnet/examples/Shared/Messaging/RemoteOrderedMessageListener.cs
similarity index 88%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Messaging/RemoteOrderedListener.cs
rename to modules/platforms/dotnet/examples/Shared/Messaging/RemoteOrderedMessageListener.cs
index fd7e6ff..0ab3f5d 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Messaging/RemoteOrderedListener.cs
+++ b/modules/platforms/dotnet/examples/Shared/Messaging/RemoteOrderedMessageListener.cs
@@ -15,7 +15,8 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Messaging
+#pragma warning disable 649 // Readonly field is never assigned
+namespace Apache.Ignite.Examples.Shared.Messaging
{
using System;
using Apache.Ignite.Core;
@@ -25,16 +26,14 @@ namespace Apache.Ignite.ExamplesDll.Messaging
/// <summary>
/// Listener for Ordered topic.
/// </summary>
- public class RemoteOrderedListener : IMessageListener<int>
+ public class RemoteOrderedMessageListener : IMessageListener<int>
{
/** Injected Ignite instance. */
[InstanceResource]
-#pragma warning disable 649
private readonly IIgnite _ignite;
-#pragma warning restore 649
/// <summary>
- /// Receives a message and returns a value
+ /// Receives a message and returns a value
/// indicating whether provided message and node id satisfy this predicate.
/// Returning false will unsubscribe this listener from future notifications.
/// </summary>
@@ -50,4 +49,4 @@ namespace Apache.Ignite.ExamplesDll.Messaging
return true;
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Messaging/RemoteUnorderedListener.cs b/modules/platforms/dotnet/examples/Shared/Messaging/RemoteUnorderedMessageListener.cs
similarity index 88%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Messaging/RemoteUnorderedListener.cs
rename to modules/platforms/dotnet/examples/Shared/Messaging/RemoteUnorderedMessageListener.cs
index 1432f11..51d902c 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Messaging/RemoteUnorderedListener.cs
+++ b/modules/platforms/dotnet/examples/Shared/Messaging/RemoteUnorderedMessageListener.cs
@@ -15,7 +15,8 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Messaging
+#pragma warning disable 649 // Readonly field is never assigned
+namespace Apache.Ignite.Examples.Shared.Messaging
{
using System;
using Apache.Ignite.Core;
@@ -25,16 +26,14 @@ namespace Apache.Ignite.ExamplesDll.Messaging
/// <summary>
/// Listener for Unordered topic.
/// </summary>
- public class RemoteUnorderedListener : IMessageListener<int>
+ public class RemoteUnorderedMessageListener : IMessageListener<int>
{
/** Injected Ignite instance. */
[InstanceResource]
-#pragma warning disable 649
private readonly IIgnite _ignite;
-#pragma warning restore 649
/// <summary>
- /// Receives a message and returns a value
+ /// Receives a message and returns a value
/// indicating whether provided message and node id satisfy this predicate.
/// Returning false will unsubscribe this listener from future notifications.
/// </summary>
@@ -50,4 +49,4 @@ namespace Apache.Ignite.ExamplesDll.Messaging
return true;
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Messaging/Topic.cs b/modules/platforms/dotnet/examples/Shared/Messaging/Topic.cs
similarity index 94%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Messaging/Topic.cs
rename to modules/platforms/dotnet/examples/Shared/Messaging/Topic.cs
index bda0bfe..76838d1 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Messaging/Topic.cs
+++ b/modules/platforms/dotnet/examples/Shared/Messaging/Topic.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Messaging
+namespace Apache.Ignite.Examples.Shared.Messaging
{
/// <summary>
/// Message topics.
@@ -25,4 +25,4 @@ namespace Apache.Ignite.ExamplesDll.Messaging
public const int Ordered = 1;
public const int Unordered = 2;
}
-}
\ No newline at end of file
+}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Account.cs b/modules/platforms/dotnet/examples/Shared/Models/Account.cs
similarity index 97%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Account.cs
rename to modules/platforms/dotnet/examples/Shared/Models/Account.cs
index 8d659e1..996fb3a 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Account.cs
+++ b/modules/platforms/dotnet/examples/Shared/Models/Account.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Binary
+namespace Apache.Ignite.Examples.Shared.Models
{
using System;
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Address.cs b/modules/platforms/dotnet/examples/Shared/Models/Address.cs
similarity index 98%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Address.cs
rename to modules/platforms/dotnet/examples/Shared/Models/Address.cs
index 0bacdb7..ca64755 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Address.cs
+++ b/modules/platforms/dotnet/examples/Shared/Models/Address.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Binary
+namespace Apache.Ignite.Examples.Shared.Models
{
using Apache.Ignite.Core.Binary;
using Apache.Ignite.Core.Cache.Configuration;
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Employee.cs b/modules/platforms/dotnet/examples/Shared/Models/Employee.cs
similarity index 98%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Employee.cs
rename to modules/platforms/dotnet/examples/Shared/Models/Employee.cs
index d4637e3..9a46f90 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Employee.cs
+++ b/modules/platforms/dotnet/examples/Shared/Models/Employee.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Binary
+namespace Apache.Ignite.Examples.Shared.Models
{
using System.Collections.Generic;
using System.Linq;
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Organization.cs b/modules/platforms/dotnet/examples/Shared/Models/Organization.cs
similarity index 98%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Organization.cs
rename to modules/platforms/dotnet/examples/Shared/Models/Organization.cs
index 7495ee9..a4d6e0b 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/Organization.cs
+++ b/modules/platforms/dotnet/examples/Shared/Models/Organization.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Binary
+namespace Apache.Ignite.Examples.Shared.Models
{
using System;
using Apache.Ignite.Core.Cache.Configuration;
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/OrganizationType.cs b/modules/platforms/dotnet/examples/Shared/Models/OrganizationType.cs
similarity index 96%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/OrganizationType.cs
rename to modules/platforms/dotnet/examples/Shared/Models/OrganizationType.cs
index 098fab9..13e82c1 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Binary/OrganizationType.cs
+++ b/modules/platforms/dotnet/examples/Shared/Models/OrganizationType.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Binary
+namespace Apache.Ignite.Examples.Shared.Models
{
/// <summary>
/// Organization type.
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Services/MapService.cs b/modules/platforms/dotnet/examples/Shared/Services/MapService.cs
similarity index 96%
rename from modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Services/MapService.cs
rename to modules/platforms/dotnet/examples/Shared/Services/MapService.cs
index 8ca9ab0..99201df 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Services/MapService.cs
+++ b/modules/platforms/dotnet/examples/Shared/Services/MapService.cs
@@ -15,7 +15,8 @@
* limitations under the License.
*/
-namespace Apache.Ignite.ExamplesDll.Services
+#pragma warning disable 649 // Readonly field is never assigned
+namespace Apache.Ignite.Examples.Shared.Services
{
using System;
using Apache.Ignite.Core;
@@ -51,7 +52,7 @@ namespace Apache.Ignite.ExamplesDll.Services
/// <summary>
/// Starts execution of this service. This method is automatically invoked whenever an instance of the service
/// is deployed on an Ignite node. Note that service is considered deployed even after it exits the Execute
- /// method and can be cancelled (or undeployed) only by calling any of the Cancel methods on
+ /// method and can be cancelled (or undeployed) only by calling any of the Cancel methods on
/// <see cref="IServices"/> API. Also note that service is not required to exit from Execute method until
/// Cancel method was called.
/// </summary>
diff --git a/modules/platforms/dotnet/examples/Shared/Shared.csproj b/modules/platforms/dotnet/examples/Shared/Shared.csproj
new file mode 100644
index 0000000..837b34a
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Shared/Shared.csproj
@@ -0,0 +1,15 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Shared</RootNamespace>
+ <NoWarn>CS0649</NoWarn>
+ </PropertyGroup>
+
+ <!-- Standalone examples mode: use NuGet -->
+ <ItemGroup Condition="$(IgniteBinaryDistro) == '' And $(IgniteDevMode) == ''">
+ <PackageReference Include="Apache.Ignite" Version="2.*" />
+ <PackageReference Include="Apache.Ignite.Linq" Version="2.*" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Shared/Utils.cs b/modules/platforms/dotnet/examples/Shared/Utils.cs
new file mode 100644
index 0000000..e3d6806
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Shared/Utils.cs
@@ -0,0 +1,191 @@
+/*
+ * 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.Examples.Shared
+{
+ using System;
+ using System.Collections.Generic;
+ using Apache.Ignite.Core;
+ using Apache.Ignite.Core.Cache;
+ using Apache.Ignite.Core.Client;
+ using Apache.Ignite.Core.Client.Cache;
+ using Apache.Ignite.Core.Deployment;
+ using Apache.Ignite.Core.Discovery.Tcp;
+ using Apache.Ignite.Core.Discovery.Tcp.Multicast;
+ using Apache.Ignite.Core.Log;
+ using Apache.Ignite.Examples.Shared.Models;
+ using Apache.Ignite.Examples.Shared.Services;
+
+ /// <summary>
+ /// Common configuration and sample data.
+ /// </summary>
+ public static class Utils
+ {
+ /// <summary>
+ /// Initializes the <see cref="Utils"/> class.
+ /// </summary>
+ static Utils()
+ {
+ // Only necessary during Ignite development.
+ Environment.SetEnvironmentVariable("IGNITE_NATIVE_TEST_CLASSPATH", "true");
+ }
+
+ /// <summary>
+ /// Gets the server node configuration.
+ /// </summary>
+ public static IgniteConfiguration GetServerNodeConfiguration()
+ {
+ // None of the options below are mandatory for the examples to work.
+ // * Discovery and localhost settings improve startup time
+ // * Logging options reduce console output
+ return new IgniteConfiguration
+ {
+ Localhost = "127.0.0.1",
+ DiscoverySpi = new TcpDiscoverySpi
+ {
+ IpFinder = new TcpDiscoveryMulticastIpFinder
+ {
+ Endpoints = new[]
+ {
+ "127.0.0.1:47500..47502"
+ }
+ }
+ },
+ JvmOptions = new[]
+ {
+ "-DIGNITE_QUIET=true",
+ "-DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true"
+ },
+ Logger = new ConsoleLogger
+ {
+ MinLevel = LogLevel.Error
+ },
+ PeerAssemblyLoadingMode = PeerAssemblyLoadingMode.CurrentAppDomain
+ };
+ }
+
+ /// <summary>
+ /// Gets the thick client node configuration.
+ /// </summary>
+ public static IgniteConfiguration GetClientNodeConfiguration()
+ {
+ return new IgniteConfiguration(GetServerNodeConfiguration())
+ {
+ ClientMode = true
+ };
+ }
+
+ /// <summary>
+ /// Gets the thin client node configuration.
+ /// </summary>
+ public static IgniteClientConfiguration GetThinClientConfiguration()
+ {
+ return new IgniteClientConfiguration
+ {
+ Endpoints = new[]
+ {
+ "127.0.0.1"
+ }
+ };
+ }
+
+ /// <summary>
+ /// Populates the cache with employee data.
+ /// </summary>
+ public static void PopulateCache(ICache<int, Employee> cache)
+ {
+ var id = 0;
+
+ foreach (var employee in GetSampleEmployees())
+ cache.Put(id++, employee);
+ }
+
+ /// <summary>
+ /// Populates the cache with employee data.
+ /// </summary>
+ public static void PopulateCache(ICacheClient<int, Employee> cache)
+ {
+ var id = 0;
+
+ foreach (var employee in GetSampleEmployees())
+ cache.Put(id++, employee);
+ }
+
+ /// <summary>
+ /// Gets the sample employee data.
+ /// </summary>
+ public static IEnumerable<Employee> GetSampleEmployees()
+ {
+ yield return new Employee(
+ "James Wilson",
+ 12500,
+ new Address("1096 Eddy Street, San Francisco, CA", 94109),
+ new[] {"Human Resources", "Customer Service"},
+ 1);
+
+ yield return new Employee(
+ "Daniel Adams",
+ 11000,
+ new Address("184 Fidler Drive, San Antonio, TX", 78130),
+ new[] {"Development", "QA"},
+ 1);
+
+ yield return new Employee(
+ "Cristian Moss",
+ 12500,
+ new Address("667 Jerry Dove Drive, Florence, SC", 29501),
+ new[] {"Logistics"},
+ 1);
+
+ yield return new Employee(
+ "Allison Mathis",
+ 25300,
+ new Address("2702 Freedom Lane, San Francisco, CA", 94109),
+ new[] {"Development"},
+ 2);
+
+ yield return new Employee(
+ "Breana Robbin",
+ 6500,
+ new Address("3960 Sundown Lane, Austin, TX", 78130),
+ new[] {"Sales"},
+ 2);
+
+ yield return new Employee(
+ "Philip Horsley",
+ 19800,
+ new Address("2803 Elsie Drive, Sioux Falls, SD", 57104),
+ new[] {"Sales"},
+ 2);
+
+ yield return new Employee(
+ "Brian Peters",
+ 10600,
+ new Address("1407 Pearlman Avenue, Boston, MA", 12110),
+ new[] {"Development", "QA"},
+ 2);
+ }
+
+ /// <summary>
+ /// Deploys default services.
+ /// </summary>
+ public static void DeployDefaultServices(IIgnite ignite)
+ {
+ ignite.GetServices().DeployNodeSingleton("default-map-service", new MapService<int, string>());
+ }
+ }
+}
diff --git a/modules/platforms/dotnet/examples/Thick/Cache/BinaryMode/BinaryMode.csproj b/modules/platforms/dotnet/examples/Thick/Cache/BinaryMode/BinaryMode.csproj
new file mode 100644
index 0000000..4f9560f
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Cache/BinaryMode/BinaryMode.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Cache.BinaryMode</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs b/modules/platforms/dotnet/examples/Thick/Cache/BinaryMode/Program.cs
similarity index 87%
copy from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs
copy to modules/platforms/dotnet/examples/Thick/Cache/BinaryMode/Program.cs
index 605892a..c25b63b 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Cache/BinaryMode/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Datagrid
+namespace Apache.Ignite.Examples.Thick.Cache.BinaryMode
{
using System;
using Apache.Ignite.Core;
@@ -23,43 +23,28 @@ namespace Apache.Ignite.Examples.Datagrid
using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.Core.Cache.Query;
+ using Apache.Ignite.Examples.Shared;
/// <summary>
- /// This example works with cache entirely in binary mode: no classes or configurations are needed.
- /// <para />
- /// 1) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 2) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config
- /// 2) Start example.
+ /// This example works with cache entirely in binary mode: no classes are needed.
/// </summary>
- public class BinaryModeExample
+ public static class Program
{
- /// <summary>Cache name.</summary>
private const string CacheName = "dotnet_binary_cache";
- /// <summary>Person type name.</summary>
private const string PersonType = "Person";
- /// <summary>Company type name.</summary>
private const string CompanyType = "Company";
- /// <summary>Name field name.</summary>
private const string NameField = "Name";
-
- /// <summary>Company ID field name.</summary>
+
private const string CompanyIdField = "CompanyId";
- /// <summary>ID field name.</summary>
private const string IdField = "Id";
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgnite ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Binary mode example started.");
@@ -141,12 +126,12 @@ namespace Apache.Ignite.Examples.Datagrid
string name = person.GetField<string>(NameField);
Console.WriteLine();
- Console.WriteLine(">>> Name of the person with id {0}: {1}", id, name);
+ Console.WriteLine($">>> Name of the person with id {id}: {name}");
// Modify the binary object.
- cache[id] = person.ToBuilder().SetField("Name", name + " Jr.").Build();
+ cache[id] = person.ToBuilder().SetField("Name", $"{name} Jr.").Build();
- Console.WriteLine(">>> Modified person with id {0}: {1}", id, cache[1]);
+ Console.WriteLine($">>> Modified person with id {id}: {cache[1]}");
}
/// <summary>
diff --git a/modules/platforms/dotnet/examples/Thick/Cache/DataStreamer/DataStreamer.csproj b/modules/platforms/dotnet/examples/Thick/Cache/DataStreamer/DataStreamer.csproj
new file mode 100644
index 0000000..c776a5f
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Cache/DataStreamer/DataStreamer.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Cache.DataStreamer</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/DataStreamerExample.cs b/modules/platforms/dotnet/examples/Thick/Cache/DataStreamer/Program.cs
similarity index 61%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/DataStreamerExample.cs
rename to modules/platforms/dotnet/examples/Thick/Cache/DataStreamer/Program.cs
index c4bf342..60355b3 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/DataStreamerExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Cache/DataStreamer/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,45 +15,29 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Datagrid
+namespace Apache.Ignite.Examples.Thick.Cache.DataStreamer
{
using System;
using System.Diagnostics;
using Apache.Ignite.Core;
using Apache.Ignite.Core.Datastream;
- using Apache.Ignite.ExamplesDll.Binary;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Models;
/// <summary>
/// Demonstrates how cache can be populated with data utilizing <see cref="IDataStreamer{TK,TV}"/>.
- /// Data streamer is a lot more efficient to use than standard cache put operation
+ /// Data streamer is a lot more efficient to use than standard cache put operation
/// as it properly buffers cache requests together and properly manages load on remote nodes.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
/// </summary>
- public class DataStreamerExample
+ public static class Program
{
- /// <summary>Number of entries to load.</summary>
private const int EntryCount = 500000;
- /// <summary>Cache name.</summary>
private const string CacheName = "dotnet_cache_data_streamer";
- /// <summary>
- /// Runs the example.
- /// </summary>
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgnite ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Cache data streamer example started.");
@@ -61,7 +45,7 @@ namespace Apache.Ignite.Examples.Datagrid
// Clean up caches on all nodes before run.
ignite.GetOrCreateCache<int, Account>(CacheName).Clear();
- Stopwatch timer = new Stopwatch();
+ var timer = new Stopwatch();
timer.Start();
@@ -75,15 +59,13 @@ namespace Apache.Ignite.Examples.Datagrid
// Print out progress while loading cache.
if (i > 0 && i % 10000 == 0)
- Console.WriteLine("Loaded " + i + " accounts.");
+ Console.WriteLine($"Loaded {i} accounts.");
}
}
timer.Stop();
- long dur = timer.ElapsedMilliseconds;
-
- Console.WriteLine(">>> Loaded " + EntryCount + " accounts in " + dur + "ms.");
+ Console.WriteLine($">>> Loaded {EntryCount} accounts in {timer.ElapsedMilliseconds}ms.");
}
Console.WriteLine();
diff --git a/modules/platforms/dotnet/examples/Thick/Cache/EntryProcessor/EntryProcessor.csproj b/modules/platforms/dotnet/examples/Thick/Cache/EntryProcessor/EntryProcessor.csproj
new file mode 100644
index 0000000..edee948
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Cache/EntryProcessor/EntryProcessor.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Cache.EntryProcessor</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/EntryProcessorExample.cs b/modules/platforms/dotnet/examples/Thick/Cache/EntryProcessor/Program.cs
similarity index 61%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/EntryProcessorExample.cs
rename to modules/platforms/dotnet/examples/Thick/Cache/EntryProcessor/Program.cs
index 197a435..4258e0b 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/EntryProcessorExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Cache/EntryProcessor/Program.cs
@@ -15,44 +15,28 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Datagrid
+namespace Apache.Ignite.Examples.Thick.Cache.EntryProcessor
{
using System;
using System.Linq;
using Apache.Ignite.Core;
using Apache.Ignite.Core.Cache;
- using Apache.Ignite.ExamplesDll.Datagrid;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Cache;
/// <summary>
- /// This example demonstrates the affinity collocation of a closure with data
+ /// This example demonstrates the affinity collocation of a closure with data
/// by creating and modifying cache entries via an EntryProcessor.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
/// </summary>
- public static class EntryProcessorExample
+ public static class Program
{
- /// <summary>Cache name.</summary>
- private const string CacheName = "dotnet_cache_put_get";
+ private const string CacheName = "dotnet_cache_entry_processor";
- /// <summary>Entry count.</summary>
private const int EntryCount = 20;
- /// <summary>
- /// Runs the example.
- /// </summary>
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgnite ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Cache EntryProcessor example started.");
@@ -79,10 +63,6 @@ namespace Apache.Ignite.Examples.Datagrid
Console.ReadKey();
}
- /// <summary>
- /// Prints the cache entries.
- /// </summary>
- /// <param name="cache">The cache.</param>
private static void PrintCacheEntries(ICache<int, int> cache)
{
Console.WriteLine("\n>>> Entries in cache:");
diff --git a/modules/platforms/dotnet/examples/Thick/Cache/MultiTieredCache/MultiTieredCache.csproj b/modules/platforms/dotnet/examples/Thick/Cache/MultiTieredCache/MultiTieredCache.csproj
new file mode 100644
index 0000000..4a1fa69
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Cache/MultiTieredCache/MultiTieredCache.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Cache.MultiTieredCache</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs b/modules/platforms/dotnet/examples/Thick/Cache/MultiTieredCache/Program.cs
similarity index 79%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
rename to modules/platforms/dotnet/examples/Thick/Cache/MultiTieredCache/Program.cs
index 119504b..7a7adee 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Cache/MultiTieredCache/Program.cs
@@ -15,8 +15,7 @@
* limitations under the License.
*/
-// ReSharper disable AssignNullToNotNullAttribute
-namespace Apache.Ignite.Examples.Datagrid
+namespace Apache.Ignite.Examples.Thick.Cache.MultiTieredCache
{
using System;
using System.IO;
@@ -25,19 +24,14 @@ namespace Apache.Ignite.Examples.Datagrid
using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.Core.Cache.Eviction;
+ using Apache.Ignite.Examples.Shared;
/// <summary>
- /// This example demonstrates on how to configure a multi-tiered Ignite cache that will store data in different
+ /// This example demonstrates on how to configure a multi-tiered Ignite cache that will store data in different
/// memory spaces (on-heap, off-heap, swap) depending on the total cache size and eviction policies that are set.
/// NOTE: There must be no other cluster nodes running on the host.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
/// </summary>
- public class MultiTieredCacheExample
+ public static class Program
{
/// <summary>Example cache name.</summary>
private const string CacheName = "dotnet_multi_tiered_example_cache";
@@ -45,19 +39,18 @@ namespace Apache.Ignite.Examples.Datagrid
/// <summary>Cache entry size, in bytes..</summary>
private const int EntrySize = 1024;
- [STAThread]
public static void Main()
{
Console.WriteLine();
Console.WriteLine(">>> Multi-tiered cache example started.");
// Configure swap in the current bin directory (where our assembly is located).
- var binDir = Path.GetDirectoryName(typeof(MultiTieredCacheExample).Assembly.Location);
+ var binDir = Path.GetDirectoryName(typeof(Program).Assembly.Location);
var swapDir = Path.Combine(binDir, "ignite-swap");
Console.WriteLine(">>> Swap space directory: " + swapDir);
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (var ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
var cacheCfg = new CacheConfiguration
{
@@ -65,8 +58,8 @@ namespace Apache.Ignite.Examples.Datagrid
Backups = 1,
EvictionPolicy = new LruEvictionPolicy
{
- MaxSize = 10 // Maximum number of entries that will be stored in Java heap.
- },
+ MaxSize = 10 // Maximum number of entries that will be stored in Java heap.
+ }
};
ICache<int, byte[]> cache = ignite.GetOrCreateCache<int, byte[]>(cacheCfg);
@@ -109,8 +102,8 @@ namespace Apache.Ignite.Examples.Datagrid
var metrics = cache.GetLocalMetrics();
Console.WriteLine("\n>>> Cache entries layout: [Total={0}, Java heap={1}, Off-Heap={2}]",
- cache.GetSize(CachePeekMode.All),
+ cache.GetSize(CachePeekMode.All),
metrics.Size, metrics.OffHeapEntriesCount);
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/platforms/dotnet/examples/Thick/Cache/NearCache/NearCache.csproj b/modules/platforms/dotnet/examples/Thick/Cache/NearCache/NearCache.csproj
new file mode 100644
index 0000000..fc5100e
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Cache/NearCache/NearCache.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Cache.NearCache</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/NearCacheExample.cs b/modules/platforms/dotnet/examples/Thick/Cache/NearCache/Program.cs
similarity index 70%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/NearCacheExample.cs
rename to modules/platforms/dotnet/examples/Thick/Cache/NearCache/Program.cs
index 1c18256..e3ab5e0 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/NearCacheExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Cache/NearCache/Program.cs
@@ -15,39 +15,30 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Datagrid
+namespace Apache.Ignite.Examples.Thick.Cache.NearCache
{
using System;
using Apache.Ignite.Core;
using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.Core.Cache.Eviction;
+ using Apache.Ignite.Examples.Shared;
/// <summary>
/// Example demonstrates the usage of a near cache on an Ignite client node side.
/// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example must be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config
- /// 2) Start example.
+ /// This example requires an Ignite server node. You can start the node in any of the following ways:
+ /// * docker run -p 10800:10800 apacheignite/ignite
+ /// * dotnet run -p ServerNode.csproj
+ /// * ignite.sh/ignite.bat from the distribution
/// </summary>
- public class NearCacheExample
+ public static class Program
{
private const string CacheName = "dotnet_near_cache_example";
- [STAThread]
public static void Main()
{
- // Make sure to start an Ignite server node before.
- Ignition.ClientMode = true;
-
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (var ignite = Ignition.Start(Utils.GetClientNodeConfiguration()))
{
Console.WriteLine(">>> Client node connected to the cluster");
@@ -66,12 +57,12 @@ namespace Apache.Ignite.Examples.Datagrid
ICache<int, int> cache = ignite.GetOrCreateCache<int, int>(
new CacheConfiguration(CacheName), nearCacheCfg);
- // Adding data into the cache.
+ // Adding data into the cache.
// Latest 10 entries will be stored in the near cache on the client node side.
for (int i = 0; i < 1000; i++)
cache.Put(i, i * 10);
- Console.WriteLine(">>> Cache size: [Total={0}, Near={1}]",
+ Console.WriteLine(">>> Cache size: [Total={0}, Near={1}]",
cache.GetSize(), cache.GetSize(CachePeekMode.Near));
Console.WriteLine("\n>>> Reading from near cache...");
diff --git a/modules/platforms/dotnet/examples/Thick/Cache/OptimisticTransaction/OptimisticTransaction.csproj b/modules/platforms/dotnet/examples/Thick/Cache/OptimisticTransaction/OptimisticTransaction.csproj
new file mode 100644
index 0000000..10a2377
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Cache/OptimisticTransaction/OptimisticTransaction.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Cache.OptimisticTransaction</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/OptimisticTransactionExample.cs b/modules/platforms/dotnet/examples/Thick/Cache/OptimisticTransaction/Program.cs
similarity index 76%
copy from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/OptimisticTransactionExample.cs
copy to modules/platforms/dotnet/examples/Thick/Cache/OptimisticTransaction/Program.cs
index 0f4f149..2c6e4a5 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/OptimisticTransactionExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Cache/OptimisticTransaction/Program.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Datagrid
+namespace Apache.Ignite.Examples.Thick.Cache.OptimisticTransaction
{
using System;
using System.Threading;
@@ -24,36 +24,27 @@ namespace Apache.Ignite.Examples.Datagrid
using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.Core.Transactions;
+ using Apache.Ignite.Examples.Shared;
/// <summary>
/// This example demonstrates optimistic transaction concurrency control.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
/// </summary>
- public class OptimisticTransactionExample
+ public static class Program
{
- /// <summary>Cache name.</summary>
private const string CacheName = "dotnet_optimistic_tx_example";
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (var ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Optimistic transaction example started.");
// Create Transactional cache.
- var cacheCfg = new CacheConfiguration(CacheName) { AtomicityMode = CacheAtomicityMode.Transactional };
+ var cacheCfg = new CacheConfiguration(CacheName)
+ {
+ AtomicityMode = CacheAtomicityMode.Transactional
+ };
var cache = ignite.GetOrCreateCache<int, int>(cacheCfg);
@@ -107,4 +98,4 @@ namespace Apache.Ignite.Examples.Datagrid
}
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs b/modules/platforms/dotnet/examples/Thick/Cache/PutGet/Program.cs
similarity index 83%
copy from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs
copy to modules/platforms/dotnet/examples/Thick/Cache/PutGet/Program.cs
index d07c58d..7ad249d 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Cache/PutGet/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,44 +15,26 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Datagrid
+namespace Apache.Ignite.Examples.Thick.Cache.PutGet
{
using System;
using System.Collections.Generic;
using Apache.Ignite.Core;
using Apache.Ignite.Core.Binary;
using Apache.Ignite.Core.Cache;
- using Apache.Ignite.ExamplesDll.Binary;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Models;
/// <summary>
- /// This example demonstrates several put-get operations on Ignite cache
- /// with binary values. Note that binary object can be retrieved in
- /// fully-deserialized form or in binary object format using special
- /// cache projection.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
+ /// Put/Get example.
/// </summary>
- public class PutGetExample
+ public static class Program
{
- /// <summary>Cache name.</summary>
private const string CacheName = "dotnet_cache_put_get";
- /// <summary>
- /// Runs the example.
- /// </summary>
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgnite ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Cache put-get example started.");
diff --git a/modules/platforms/dotnet/examples/Thick/Cache/PutGet/PutGet.csproj b/modules/platforms/dotnet/examples/Thick/Cache/PutGet/PutGet.csproj
new file mode 100644
index 0000000..1f46397
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Cache/PutGet/PutGet.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Cache.PutGet</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/ContinuousQueryExample.cs b/modules/platforms/dotnet/examples/Thick/Cache/QueryContinuous/Program.cs
similarity index 69%
copy from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/ContinuousQueryExample.cs
copy to modules/platforms/dotnet/examples/Thick/Cache/QueryContinuous/Program.cs
index d2e2726..e4f9f26 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/ContinuousQueryExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Cache/QueryContinuous/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Datagrid
+namespace Apache.Ignite.Examples.Thick.Cache.QueryContinuous
{
using System;
using System.Collections.Generic;
@@ -23,34 +23,19 @@ namespace Apache.Ignite.Examples.Datagrid
using Apache.Ignite.Core;
using Apache.Ignite.Core.Cache.Event;
using Apache.Ignite.Core.Cache.Query.Continuous;
- using Apache.Ignite.ExamplesDll.Datagrid;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Cache;
/// <summary>
- /// This example demonstrates continuous query API.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
+ /// Continuous Query example.
/// </summary>
- public class ContinuousQueryExample
+ public static class Program
{
- /// <summary>Cache name.</summary>
private const string CacheName = "dotnet_cache_continuous_query";
- /// <summary>
- /// Runs the example.
- /// </summary>
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgnite ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Cache continuous query example started.");
diff --git a/modules/platforms/dotnet/examples/Thick/Cache/QueryContinuous/QueryContinuous.csproj b/modules/platforms/dotnet/examples/Thick/Cache/QueryContinuous/QueryContinuous.csproj
new file mode 100644
index 0000000..639f56c
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Cache/QueryContinuous/QueryContinuous.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Cache.QueryContinuous</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Thick/Cache/QueryFullText/Program.cs b/modules/platforms/dotnet/examples/Thick/Cache/QueryFullText/Program.cs
new file mode 100644
index 0000000..f18f47e
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Cache/QueryFullText/Program.cs
@@ -0,0 +1,62 @@
+/*
+ * 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.Examples.Thick.Cache.QueryFullText
+{
+ using System;
+ using Apache.Ignite.Core;
+ using Apache.Ignite.Core.Cache.Configuration;
+ using Apache.Ignite.Core.Cache.Query;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Models;
+
+ /// <summary>
+ /// This example demonstrates full-text search capabilities.
+ /// </summary>
+ public static class Program
+ {
+ private const string EmployeeCacheName = "dotnet_cache_query_employee";
+
+ public static void Main()
+ {
+ using (var ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
+ {
+ Console.WriteLine();
+ Console.WriteLine(">>> Cache full-text query example started.");
+
+ var employeeCache = ignite.GetOrCreateCache<int, Employee>(
+ new CacheConfiguration(EmployeeCacheName, new QueryEntity(typeof(int), typeof(Employee))));
+
+ Utils.PopulateCache(employeeCache);
+
+ var qry = employeeCache.Query(new TextQuery(queryType: "Employee", text: "TX"));
+
+ Console.WriteLine();
+ Console.WriteLine(">>> Employees living in Texas:");
+
+ foreach (var entry in qry)
+ Console.WriteLine(">>> " + entry.Value);
+
+ Console.WriteLine();
+ }
+
+ Console.WriteLine();
+ Console.WriteLine(">>> Example finished, press any key to exit ...");
+ Console.ReadKey();
+ }
+ }
+}
diff --git a/modules/platforms/dotnet/examples/Thick/Cache/QueryFullText/QueryFullText.csproj b/modules/platforms/dotnet/examples/Thick/Cache/QueryFullText/QueryFullText.csproj
new file mode 100644
index 0000000..80869da
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Cache/QueryFullText/QueryFullText.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Cache.QueryFullText</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Thick/Cache/QueryScan/Program.cs b/modules/platforms/dotnet/examples/Thick/Cache/QueryScan/Program.cs
new file mode 100644
index 0000000..357c02f
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Cache/QueryScan/Program.cs
@@ -0,0 +1,65 @@
+/*
+ * 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.Examples.Thick.Cache.QueryScan
+{
+ using System;
+ using Apache.Ignite.Core;
+ using Apache.Ignite.Core.Cache.Configuration;
+ using Apache.Ignite.Core.Cache.Query;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Cache;
+ using Apache.Ignite.Examples.Shared.Models;
+
+ /// <summary>
+ /// This example demonstrates a Scan query with a remote filter.
+ /// </summary>
+ public static class Program
+ {
+ private const string EmployeeCacheName = "dotnet_cache_query_employee";
+
+ public static void Main()
+ {
+ using (var ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
+ {
+ Console.WriteLine();
+ Console.WriteLine(">>> Cache scan query example started.");
+
+ var employeeCache = ignite.GetOrCreateCache<int, Employee>(
+ new CacheConfiguration(EmployeeCacheName, new QueryEntity(typeof(int), typeof(Employee))));
+
+ Utils.PopulateCache(employeeCache);
+
+ const int zip = 94109;
+
+ var qry = employeeCache.Query(new ScanQuery<int, Employee>(new ScanQueryFilter(zip)));
+
+ Console.WriteLine();
+ Console.WriteLine(">>> Employees with zipcode {0} (scan):", zip);
+
+ foreach (var entry in qry)
+ Console.WriteLine(">>> " + entry.Value);
+
+ Console.WriteLine();
+ }
+
+ Console.WriteLine();
+ Console.WriteLine(">>> Example finished, press any key to exit ...");
+ Console.ReadKey();
+ }
+ }
+}
diff --git a/modules/platforms/dotnet/examples/Thick/Cache/QueryScan/QueryScan.csproj b/modules/platforms/dotnet/examples/Thick/Cache/QueryScan/QueryScan.csproj
new file mode 100644
index 0000000..b710f75
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Cache/QueryScan/QueryScan.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Cache.QueryScan</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/StoreExample.cs b/modules/platforms/dotnet/examples/Thick/Cache/Store/Program.cs
similarity index 75%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/StoreExample.cs
rename to modules/platforms/dotnet/examples/Thick/Cache/Store/Program.cs
index 6915d79..e59ee35 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/StoreExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Cache/Store/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,41 +15,26 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Datagrid
+namespace Apache.Ignite.Examples.Thick.Cache.Store
{
using System;
using System.Collections.Generic;
using Apache.Ignite.Core;
using Apache.Ignite.Core.Cache.Configuration;
- using Apache.Ignite.ExamplesDll.Binary;
- using Apache.Ignite.ExamplesDll.Datagrid;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Cache;
+ using Apache.Ignite.Examples.Shared.Models;
/// <summary>
- /// Example demonstrating cache store.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
+ /// This example demonstrates a custom cache store usage.
/// </summary>
- public class StoreExample
+ public static class Program
{
- /// <summary>Cache name.</summary>
private const string CacheName = "dotnet_cache_with_store";
- /// <summary>
- /// Runs the example.
- /// </summary>
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (var ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Cache store example started.");
diff --git a/modules/platforms/dotnet/examples/Thick/Cache/Store/Store.csproj b/modules/platforms/dotnet/examples/Thick/Cache/Store/Store.csproj
new file mode 100644
index 0000000..98046fc
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Cache/Store/Store.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Cache.Store</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionExample.cs b/modules/platforms/dotnet/examples/Thick/Cache/Transaction/Program.cs
similarity index 77%
copy from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionExample.cs
copy to modules/platforms/dotnet/examples/Thick/Cache/Transaction/Program.cs
index 83d08ff..1bad509 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Cache/Transaction/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Datagrid
+namespace Apache.Ignite.Examples.Thick.Cache.Transaction
{
using System;
using System.Transactions;
@@ -23,34 +23,19 @@ namespace Apache.Ignite.Examples.Datagrid
using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.Core.Transactions;
- using Apache.Ignite.ExamplesDll.Binary;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Models;
/// <summary>
- /// This example demonstrates how to use transactions on Apache cache.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
+ /// This example demonstrates transactional data updates.
/// </summary>
- public class TransactionExample
+ public static class Program
{
- /// <summary>Cache name.</summary>
private const string CacheName = "dotnet_cache_tx";
- /// <summary>
- /// Runs the example.
- /// </summary>
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (var ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Transaction example started.");
diff --git a/modules/platforms/dotnet/examples/Thick/Cache/Transaction/Transaction.csproj b/modules/platforms/dotnet/examples/Thick/Cache/Transaction/Transaction.csproj
new file mode 100644
index 0000000..55489af
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Cache/Transaction/Transaction.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Cache.Transaction</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionDeadlockDetectionExample.cs b/modules/platforms/dotnet/examples/Thick/Cache/TransactionDeadlockDetection/Program.cs
similarity index 68%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionDeadlockDetectionExample.cs
rename to modules/platforms/dotnet/examples/Thick/Cache/TransactionDeadlockDetection/Program.cs
index 7262dc4..7245147 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionDeadlockDetectionExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Cache/TransactionDeadlockDetection/Program.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Datagrid
+namespace Apache.Ignite.Examples.Thick.Cache.TransactionDeadlockDetection
{
using System;
using System.Collections.Generic;
@@ -26,38 +26,18 @@ namespace Apache.Ignite.Examples.Datagrid
using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.Core.Transactions;
+ using Apache.Ignite.Examples.Shared;
/// <summary>
- /// This example demonstrates transaction deadlock detection mechanism.
- /// <para />
- /// The feature simplifies debugging of distributed deadlocks that may be caused by your code.
- /// To enable the feature you should start an Ignite transaction with a non-zero timeout
- /// and catch TransactionDeadlockException that will contain deadlock details.
- /// For more information refer to https://apacheignite-net.readme.io/docs/transactions#deadlock-detection-in-pessimistic-transactions
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
+ /// This example demonstrates the transaction deadlock detection mechanism.
/// </summary>
- public class TransactionDeadlockDetectionExample
+ public static class Program
{
- /// <summary>Cache name.</summary>
private const string CacheName = "dotnet_cache_tx_deadlock";
- /// <summary>
- /// Runs the example.
- /// </summary>
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (var ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Transaction deadlock detection example started.");
diff --git a/modules/platforms/dotnet/examples/Thick/Cache/TransactionDeadlockDetection/TransactionDeadlockDetection.csproj b/modules/platforms/dotnet/examples/Thick/Cache/TransactionDeadlockDetection/TransactionDeadlockDetection.csproj
new file mode 100644
index 0000000..7b9cab0
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Cache/TransactionDeadlockDetection/TransactionDeadlockDetection.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Cache.TransactionDeadlockDetection</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Thick/Compute/Func/Func.csproj b/modules/platforms/dotnet/examples/Thick/Compute/Func/Func.csproj
new file mode 100644
index 0000000..7380582
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Compute/Func/Func.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Compute.Func</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/ClosureExample.cs b/modules/platforms/dotnet/examples/Thick/Compute/Func/Program.cs
similarity index 63%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/ClosureExample.cs
rename to modules/platforms/dotnet/examples/Thick/Compute/Func/Program.cs
index 0b5ac46..9013e6a 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/ClosureExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Compute/Func/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,37 +15,23 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Compute
+namespace Apache.Ignite.Examples.Thick.Compute.Func
{
using System;
using System.Collections.Generic;
using System.Linq;
using Apache.Ignite.Core;
- using Apache.Ignite.ExamplesDll.Compute;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Compute;
/// <summary>
- /// Example demonstrating closure execution.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
+ /// This example demonstrates compute func execution.
/// </summary>
- public class ClosureExample
+ public static class Program
{
- /// <summary>
- /// Runs the example.
- /// </summary>
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgnite ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Closure execution example started.");
@@ -56,7 +42,7 @@ namespace Apache.Ignite.Examples.Compute
Console.WriteLine();
Console.WriteLine(">>> Calculating character count with manual reducing:");
- var res = ignite.GetCompute().Apply(new CharacterCountClosure(), words);
+ var res = ignite.GetCompute().Apply(new CharacterCountFunc(), words);
int totalLen = res.Sum();
@@ -64,7 +50,7 @@ namespace Apache.Ignite.Examples.Compute
Console.WriteLine();
Console.WriteLine(">>> Calculating character count with reducer:");
- totalLen = ignite.GetCompute().Apply(new CharacterCountClosure(), words, new CharacterCountReducer());
+ totalLen = ignite.GetCompute().Apply(new CharacterCountFunc(), words, new CharacterCountReducer());
Console.WriteLine(">>> Total character count: " + totalLen);
Console.WriteLine();
diff --git a/modules/platforms/dotnet/examples/Thick/Compute/PeerAssemblyLoading/PeerAssemblyLoading.csproj b/modules/platforms/dotnet/examples/Thick/Compute/PeerAssemblyLoading/PeerAssemblyLoading.csproj
new file mode 100644
index 0000000..6f60c26
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Compute/PeerAssemblyLoading/PeerAssemblyLoading.csproj
@@ -0,0 +1,16 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Compute.PeerAssemblyLoading</RootNamespace>
+ <AssemblyVersion>1.0.*</AssemblyVersion>
+ <Deterministic>false</Deterministic>
+ <NoWarn>CS7035</NoWarn>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/PeerAssemblyLoadingExample.cs b/modules/platforms/dotnet/examples/Thick/Compute/PeerAssemblyLoading/Program.cs
similarity index 71%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/PeerAssemblyLoadingExample.cs
rename to modules/platforms/dotnet/examples/Thick/Compute/PeerAssemblyLoading/Program.cs
index 868e40f..f163016 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/PeerAssemblyLoadingExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Compute/PeerAssemblyLoading/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,43 +15,34 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Compute
+namespace Apache.Ignite.Examples.Thick.Compute.PeerAssemblyLoading
{
using System;
using Apache.Ignite.Core;
using Apache.Ignite.Core.Compute;
+ using Apache.Ignite.Core.Deployment;
+ using Apache.Ignite.Examples.Shared;
/// <summary>
/// Example demonstrating compute execution with peer assembly loading.
- ///
- /// Before executing the example start one or more standalone Apache Ignite.NET nodes without "-assembly"
- /// command line argument. That argument is not required on remote nodes because the assemblies are
- /// loaded automatically whenever is needed.
- ///
+ /// <para />
+ /// This example requires an Ignite server node with <see cref="IgniteConfiguration.PeerAssemblyLoadingMode"/>
+ /// set to <see cref="PeerAssemblyLoadingMode.CurrentAppDomain"/>, run ServerNode project to start it:
+ /// * dotnet run -p ServerNode.csproj
+ /// <para />
+ /// Note that <see cref="HelloAction"/> is not present in the ServerNode project.
+ /// <para />
/// Modify and re-run this example while keeping standalone nodes running to see that the
/// modified version of the computation will be executed because of automatic deployment of the updated assembly.
- ///
- /// Version is updated automatically on build because of '*' in AssemblyVersion (see AssemblyInfo.cs).
/// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
+ /// Version is updated automatically on build because of '*' in AssemblyVersion (see the csproj file).
/// <para />
- /// This example must be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config
- /// 2) Start example.
/// </summary>
- public class PeerAssemblyLoadingExample
+ public static class Program
{
- /// <summary>
- /// Runs the example.
- /// </summary>
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgnite ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Peer loading example started.");
diff --git a/modules/platforms/dotnet/examples/Thick/Compute/Task/Program.cs b/modules/platforms/dotnet/examples/Thick/Compute/Task/Program.cs
new file mode 100644
index 0000000..6a42a2b
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Compute/Task/Program.cs
@@ -0,0 +1,61 @@
+/*
+ * 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.Examples.Thick.Compute.Task
+{
+ using System;
+ using System.Linq;
+ using Apache.Ignite.Core;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Compute;
+ using Apache.Ignite.Examples.Shared.Models;
+
+ /// <summary>
+ /// This example demonstrates compute task execution.
+ /// </summary>
+ public static class Program
+ {
+ public static void Main()
+ {
+ using (IIgnite ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
+ {
+ Console.WriteLine();
+ Console.WriteLine(">>> Task execution example started.");
+
+ // Generate employees to calculate average salary for.
+ var employees = Utils.GetSampleEmployees().ToList();
+
+ Console.WriteLine();
+ Console.WriteLine(">>> Calculating average salary for employees:");
+
+ foreach (Employee employee in employees)
+ Console.WriteLine(">>> " + employee);
+
+ // Execute task and get average salary.
+ var avgSalary = ignite.GetCompute().Execute(new AverageSalaryTask(), employees);
+
+ Console.WriteLine();
+ Console.WriteLine(">>> Average salary for all employees: " + avgSalary);
+ Console.WriteLine();
+ }
+
+ Console.WriteLine();
+ Console.WriteLine(">>> Example finished, press any key to exit ...");
+ Console.ReadKey();
+ }
+ }
+}
diff --git a/modules/platforms/dotnet/examples/Thick/Compute/Task/Task.csproj b/modules/platforms/dotnet/examples/Thick/Compute/Task/Task.csproj
new file mode 100644
index 0000000..e457ecb
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Compute/Task/Task.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Compute.Task</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Thick/DataStructures/AtomicLong/AtomicLong.csproj b/modules/platforms/dotnet/examples/Thick/DataStructures/AtomicLong/AtomicLong.csproj
new file mode 100644
index 0000000..62a0204
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/DataStructures/AtomicLong/AtomicLong.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.DataStructures.AtomicLong</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/DataStructures/AtomicLongExample.cs b/modules/platforms/dotnet/examples/Thick/DataStructures/AtomicLong/Program.cs
similarity index 65%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/DataStructures/AtomicLongExample.cs
rename to modules/platforms/dotnet/examples/Thick/DataStructures/AtomicLong/Program.cs
index 86f28a5..9db7b1e 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/DataStructures/AtomicLongExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/DataStructures/AtomicLong/Program.cs
@@ -15,33 +15,24 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.DataStructures
+namespace Apache.Ignite.Examples.Thick.DataStructures.AtomicLong
{
using System;
using System.Threading;
using Apache.Ignite.Core;
using Apache.Ignite.Core.DataStructures;
- using Apache.Ignite.ExamplesDll.DataStructures;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.DataStructures;
/// <summary>
- /// The example demonstrates the usage of the distributed atomic long data structure, which has functionality
+ /// The example demonstrates the usage of the distributed atomic long data structure, which has functionality
/// similar to <see cref="Interlocked"/>, but provides cluster-wide atomicity guarantees.
- /// <para />
- /// 1) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 2) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
/// </summary>
- public static class AtomicLongExample
+ public static class Program
{
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgnite ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Atomic long example started.");
@@ -57,8 +48,8 @@ namespace Apache.Ignite.Examples.DataStructures
Console.WriteLine("\n>>> Atomic long current value: " + atomicLong.Read());
}
- Console.WriteLine("\n>>> Check output on all nodes.");
- Console.WriteLine("\n>>> Example finished, press any key to exit ...");
+ Console.WriteLine();
+ Console.WriteLine(">>> Example finished, press any key to exit ...");
Console.ReadKey();
}
}
diff --git a/modules/platforms/dotnet/examples/Thick/DataStructures/AtomicReference/AtomicReference.csproj b/modules/platforms/dotnet/examples/Thick/DataStructures/AtomicReference/AtomicReference.csproj
new file mode 100644
index 0000000..4d66292
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/DataStructures/AtomicReference/AtomicReference.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.DataStructures.AtomicReference</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/DataStructures/AtomicReferenceExample.cs b/modules/platforms/dotnet/examples/Thick/DataStructures/AtomicReference/Program.cs
similarity index 65%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/DataStructures/AtomicReferenceExample.cs
rename to modules/platforms/dotnet/examples/Thick/DataStructures/AtomicReference/Program.cs
index 9d44bcf..55843eb 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/DataStructures/AtomicReferenceExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/DataStructures/AtomicReference/Program.cs
@@ -15,31 +15,22 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.DataStructures
+namespace Apache.Ignite.Examples.Thick.DataStructures.AtomicReference
{
using System;
using Apache.Ignite.Core;
using Apache.Ignite.Core.DataStructures;
- using Apache.Ignite.ExamplesDll.DataStructures;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.DataStructures;
/// <summary>
- /// The example demonstrates the usage of the distributed atomic reference data structure.
- /// <para />
- /// 1) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 2) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
+ /// This example demonstrates the usage of the distributed atomic reference data structure.
/// </summary>
- public static class AtomicReferenceExample
+ public static class Program
{
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgnite ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Atomic reference example started.");
@@ -53,12 +44,13 @@ namespace Apache.Ignite.Examples.DataStructures
// Attempt to modify the value on each node. Only one node will succeed.
ignite.GetCompute().Broadcast(new AtomicReferenceModifyAction());
-
+
// Print current value which is equal to the Id of the node that has modified the reference first.
Console.WriteLine("\n>>> Current atomic reference value: " + atomicRef.Read());
}
- Console.WriteLine("\n>>> Example finished, press any key to exit ...");
+ Console.WriteLine();
+ Console.WriteLine(">>> Example finished, press any key to exit ...");
Console.ReadKey();
}
}
diff --git a/modules/platforms/dotnet/examples/Thick/DataStructures/AtomicSequence/AtomicSequence.csproj b/modules/platforms/dotnet/examples/Thick/DataStructures/AtomicSequence/AtomicSequence.csproj
new file mode 100644
index 0000000..2ad8ac9
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/DataStructures/AtomicSequence/AtomicSequence.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.DataStructures.AtomicSequence</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/DataStructures/AtomicSequenceExample.cs b/modules/platforms/dotnet/examples/Thick/DataStructures/AtomicSequence/Program.cs
similarity index 59%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/DataStructures/AtomicSequenceExample.cs
rename to modules/platforms/dotnet/examples/Thick/DataStructures/AtomicSequence/Program.cs
index 89e8ed3..bd885d8 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/DataStructures/AtomicSequenceExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/DataStructures/AtomicSequence/Program.cs
@@ -15,42 +15,29 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.DataStructures
+namespace Apache.Ignite.Examples.Thick.DataStructures.AtomicSequence
{
using System;
using System.Threading;
using Apache.Ignite.Core;
using Apache.Ignite.Core.DataStructures;
- using Apache.Ignite.ExamplesDll.DataStructures;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.DataStructures;
/// <summary>
- /// The example demonstrates the usage of the distributed atomic sequence data structure, which has functionality
+ /// The example demonstrates the usage of the distributed atomic sequence data structure, which has functionality
/// similar to <see cref="Interlocked"/>, but provides cluster-wide atomicity guarantees.
- /// <para />
- /// 1) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 2) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
/// </summary>
- public static class AtomicSequenceExample
+ public static class Program
{
- [STAThread]
public static void Main()
{
- // See app.config: <atomicConfiguration atomicSequenceReserveSize="10" />
- // Each node reserves 10 numbers to itself, so that 10 increments can be done locally,
- // without communicating to other nodes. After that, another 10 elements are reserved.
-
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgnite ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Atomic sequence example started.");
- IAtomicSequence atomicSequence =
+ IAtomicSequence atomicSequence =
ignite.GetAtomicSequence(AtomicSequenceIncrementAction.AtomicSequenceName, 0, true);
Console.WriteLine(">>> Atomic sequence initial value: " + atomicSequence.Read());
@@ -62,8 +49,8 @@ namespace Apache.Ignite.Examples.DataStructures
Console.WriteLine("\n>>> Atomic sequence current value: " + atomicSequence.Read());
}
- Console.WriteLine("\n>>> Check output on all nodes.");
- Console.WriteLine("\n>>> Example finished, press any key to exit ...");
+ Console.WriteLine();
+ Console.WriteLine(">>> Example finished, press any key to exit ...");
Console.ReadKey();
}
}
diff --git a/modules/platforms/dotnet/examples/Thick/Misc/ClientReconnect/ClientReconnect.csproj b/modules/platforms/dotnet/examples/Thick/Misc/ClientReconnect/ClientReconnect.csproj
new file mode 100644
index 0000000..6c33752
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Misc/ClientReconnect/ClientReconnect.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Misc.ClientReconnect</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs b/modules/platforms/dotnet/examples/Thick/Misc/ClientReconnect/Program.cs
similarity index 75%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs
rename to modules/platforms/dotnet/examples/Thick/Misc/ClientReconnect/Program.cs
index f6e1b4d..1540235 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Misc/ClientReconnect/Program.cs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Misc
+namespace Apache.Ignite.Examples.Thick.Misc.ClientReconnect
{
using System;
using System.Threading;
@@ -23,25 +23,17 @@ namespace Apache.Ignite.Examples.Misc
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;
+ using Apache.Ignite.Examples.Shared;
/// <summary>
/// This example demonstrates the usage of client's automatic reconnection feature.
/// NOTE: There must be no other cluster nodes running on the host.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder;
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
/// </summary>
- public class ClientReconnectExample
+ public static class Program
{
private const string CacheName = "dotnet_client_reconnect_cache";
- [STAThread]
public static void Main()
{
Console.WriteLine();
@@ -53,18 +45,13 @@ namespace Apache.Ignite.Examples.Misc
// Wait a moment for server to begin startup.
Thread.Sleep(200);
- var cfg = new IgniteConfiguration(GetIgniteConfiguration())
- {
- ClientMode = true
- };
-
- using (var ignite = Ignition.Start(cfg))
+ using (var ignite = Ignition.Start(Utils.GetClientNodeConfiguration()))
{
Console.WriteLine(">>> Client node connected to the cluster.");
if (ignite.GetCluster().GetNodes().Count > 2)
throw new Exception("Extra nodes detected. " +
- "ClientReconnectExample should be run without external nodes.");
+ "ClientReconnect example should be run without external nodes.");
var cache = ignite.GetCache<int, string>(CacheName);
@@ -116,7 +103,7 @@ namespace Apache.Ignite.Examples.Misc
/// <param name="evt"></param>
private static void RunServer(WaitHandle evt)
{
- var cfg = new IgniteConfiguration(GetIgniteConfiguration())
+ var cfg = new IgniteConfiguration(Utils.GetServerNodeConfiguration())
{
// Nodes within a single process are distinguished by GridName property.
IgniteInstanceName = "serverNode",
@@ -152,22 +139,5 @@ namespace Apache.Ignite.Examples.Misc
evt.WaitOne();
}
}
-
- /// <summary>
- /// Gets the base Ignite configuration.
- /// </summary>
- private static IgniteConfiguration GetIgniteConfiguration()
- {
- return new IgniteConfiguration
- {
- DiscoverySpi = new TcpDiscoverySpi
- {
- IpFinder = new TcpDiscoveryStaticIpFinder
- {
- Endpoints = new[] { "127.0.0.1:47500" }
- }
- }
- };
- }
}
}
diff --git a/modules/platforms/dotnet/examples/Thick/Misc/Events/Events.csproj b/modules/platforms/dotnet/examples/Thick/Misc/Events/Events.csproj
new file mode 100644
index 0000000..439224b
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Misc/Events/Events.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Misc.Events</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Events/EventsExample.cs b/modules/platforms/dotnet/examples/Thick/Misc/Events/Program.cs
similarity index 67%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Events/EventsExample.cs
rename to modules/platforms/dotnet/examples/Thick/Misc/Events/Program.cs
index 938b132..b1403f4 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Events/EventsExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Misc/Events/Program.cs
@@ -15,39 +15,25 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Events
+namespace Apache.Ignite.Examples.Thick.Misc.Events
{
using System;
using System.Linq;
using Apache.Ignite.Core;
using Apache.Ignite.Core.Events;
- using Apache.Ignite.ExamplesDll.Binary;
- using Apache.Ignite.ExamplesDll.Compute;
- using Apache.Ignite.ExamplesDll.Events;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Compute;
+ using Apache.Ignite.Examples.Shared.Models;
+ using LocalEventListener = Apache.Ignite.Examples.Shared.Events.LocalEventListener;
/// <summary>
- /// Example demonstrating Ignite events.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
+ /// This example demonstrates Ignite events.
/// </summary>
- public class EventsExample
+ public static class Program
{
- /// <summary>
- /// Runs the example.
- /// </summary>
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgnite ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine(">>> Events example started.");
Console.WriteLine();
@@ -57,7 +43,7 @@ namespace Apache.Ignite.Examples.Events
ignite.GetEvents().EnableLocal(EventType.TaskExecutionAll);
- var listener = new LocalListener();
+ var listener = new LocalEventListener();
ignite.GetEvents().LocalListen(listener, EventType.TaskExecutionAll);
ExecuteTask(ignite);
diff --git a/modules/platforms/dotnet/examples/Thick/Misc/Lifecycle/Lifecycle.csproj b/modules/platforms/dotnet/examples/Thick/Misc/Lifecycle/Lifecycle.csproj
new file mode 100644
index 0000000..4c88391
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Misc/Lifecycle/Lifecycle.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Misc.Lifecycle</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/LifecycleExample.cs b/modules/platforms/dotnet/examples/Thick/Misc/Lifecycle/Program.cs
similarity index 70%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/LifecycleExample.cs
rename to modules/platforms/dotnet/examples/Thick/Misc/Lifecycle/Program.cs
index 466f2fe..8a9ec58 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/LifecycleExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Misc/Lifecycle/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,32 +15,21 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Misc
+#pragma warning disable 649 // Readonly field is never assigned
+namespace Apache.Ignite.Examples.Thick.Misc.Lifecycle
{
using System;
using Apache.Ignite.Core;
- using Apache.Ignite.Core.Discovery.Tcp;
- using Apache.Ignite.Core.Discovery.Tcp.Static;
using Apache.Ignite.Core.Lifecycle;
using Apache.Ignite.Core.Resource;
+ using Apache.Ignite.Examples.Shared;
/// <summary>
/// This example shows how to provide your own <see cref="ILifecycleHandler"/> implementation
- /// to be able to hook into Apache lifecycle. Example bean will output occurred lifecycle
- /// events to the console.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
+ /// to be able to hook into the Ignite node life cycle.
/// </summary>
- public class LifecycleExample
+ public static class Program
{
- /// <summary>
- /// Runs the example.
- /// </summary>
- [STAThread]
public static void Main()
{
Console.WriteLine();
@@ -49,16 +38,10 @@ namespace Apache.Ignite.Examples.Misc
// Create new configuration.
var lifecycleAwareExample = new LifecycleHandlerExample();
- var cfg = new IgniteConfiguration
+ var cfg = new IgniteConfiguration(Utils.GetServerNodeConfiguration())
{
- DiscoverySpi = new TcpDiscoverySpi
- {
- IpFinder = new TcpDiscoveryStaticIpFinder
- {
- Endpoints = new[] {"127.0.0.1:47500"}
- }
- },
- LifecycleHandlers = new[] {lifecycleAwareExample}
+ LifecycleHandlers = new[] {lifecycleAwareExample},
+ IgniteInstanceName = "lifecycle-example"
};
// Provide lifecycle bean to configuration.
@@ -78,16 +61,11 @@ namespace Apache.Ignite.Examples.Misc
Console.ReadKey();
}
- /// <summary>
- /// Sample lifecycle bean implementation.
- /// </summary>
private class LifecycleHandlerExample : ILifecycleHandler
{
/** Auto-injected Ignite instance. */
[InstanceResource]
-#pragma warning disable 649
private IIgnite _ignite;
-#pragma warning restore 649
/** <inheritDoc /> */
public void OnLifecycleEvent(LifecycleEventType evt)
@@ -111,5 +89,6 @@ namespace Apache.Ignite.Examples.Misc
private set;
}
}
+
}
}
diff --git a/modules/platforms/dotnet/examples/Thick/Misc/Messaging/Messaging.csproj b/modules/platforms/dotnet/examples/Thick/Misc/Messaging/Messaging.csproj
new file mode 100644
index 0000000..3ba1648
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Misc/Messaging/Messaging.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Misc.Messaging</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Thick/Misc/Messaging/Program.cs b/modules/platforms/dotnet/examples/Thick/Misc/Messaging/Program.cs
new file mode 100644
index 0000000..081f341
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Misc/Messaging/Program.cs
@@ -0,0 +1,100 @@
+/*
+ * 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.Examples.Thick.Misc.Messaging
+{
+ using System;
+ using System.Threading;
+ using Apache.Ignite.Core;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Messaging;
+
+ /// <summary>
+ /// This example demonstrates Ignite messaging.
+ /// <para />
+ /// This example requires an Ignite server, run ServerNode project to start it:
+ /// * dotnet run -p ServerNode.csproj
+ /// </summary>
+ public static class Program
+ {
+ public static void Main()
+ {
+ using (IIgnite ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
+ {
+ var remotes = ignite.GetCluster().ForRemotes();
+
+ if (remotes.GetNodes().Count == 0)
+ {
+ throw new Exception("This example requires remote nodes to be started. " +
+ "Please start at least 1 remote node. " +
+ "Refer to example's documentation for details on configuration.");
+ }
+
+ Console.WriteLine(">>> Messaging example started.");
+ Console.WriteLine();
+
+ // Set up local listeners
+ var localMessaging = ignite.GetCluster().ForLocal().GetMessaging();
+
+ var msgCount = remotes.GetNodes().Count * 10;
+
+ var orderedCounter = new CountdownEvent(msgCount);
+ var unorderedCounter = new CountdownEvent(msgCount);
+
+ localMessaging.LocalListen(new LocalMessageListener(unorderedCounter), Topic.Unordered);
+
+ localMessaging.LocalListen(new LocalMessageListener(orderedCounter), Topic.Ordered);
+
+ // Set up remote listeners
+ var remoteMessaging = remotes.GetMessaging();
+
+ var idUnordered = remoteMessaging.RemoteListen(new RemoteUnorderedMessageListener(), Topic.Unordered);
+ var idOrdered = remoteMessaging.RemoteListen(new RemoteOrderedMessageListener(), Topic.Ordered);
+
+ // Send unordered
+ Console.WriteLine(">>> Sending unordered messages...");
+
+ for (var i = 0; i < 10; i++)
+ remoteMessaging.Send(i, Topic.Unordered);
+
+ Console.WriteLine(">>> Finished sending unordered messages.");
+
+ // Send ordered
+ Console.WriteLine(">>> Sending ordered messages...");
+
+ for (var i = 0; i < 10; i++)
+ remoteMessaging.SendOrdered(i, Topic.Ordered);
+
+ Console.WriteLine(">>> Finished sending ordered messages.");
+
+ Console.WriteLine(">>> Check output on all nodes for message printouts.");
+ Console.WriteLine(">>> Waiting for messages acknowledgements from all remote nodes...");
+
+ unorderedCounter.Wait();
+ orderedCounter.Wait();
+
+ // Unsubscribe
+ remoteMessaging.StopRemoteListen(idUnordered);
+ remoteMessaging.StopRemoteListen(idOrdered);
+ }
+
+ Console.WriteLine();
+ Console.WriteLine(">>> Example finished, press any key to exit ...");
+ Console.ReadKey();
+ }
+ }
+}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs b/modules/platforms/dotnet/examples/Thick/Misc/Services/Program.cs
similarity index 60%
copy from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs
copy to modules/platforms/dotnet/examples/Thick/Misc/Services/Program.cs
index 245356d..14c433c 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Misc/Services/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,35 +15,23 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Services
+namespace Apache.Ignite.Examples.Thick.Misc.Services
{
using System;
using Apache.Ignite.Core;
- using Apache.Ignite.ExamplesDll.Services;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Services;
/// <summary>
- /// Example demonstrating Ignite services.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
+ /// This example demonstrates Ignite service deployment and execution.
/// </summary>
- public class ServicesExample
+ public static class Program
{
- /// <summary>
- /// Runs the example.
- /// </summary>
- [STAThread]
+ private const string ServiceName = "my-service";
+
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgnite ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine(">>> Services example started.");
Console.WriteLine();
@@ -51,10 +39,10 @@ namespace Apache.Ignite.Examples.Services
// Deploy a service
var svc = new MapService<int, string>();
Console.WriteLine(">>> Deploying service to all nodes...");
- ignite.GetServices().DeployNodeSingleton("service", svc);
+ ignite.GetServices().DeployNodeSingleton(ServiceName, svc);
// Get a sticky service proxy so that we will always be contacting the same remote node.
- var prx = ignite.GetServices().GetServiceProxy<IMapService<int, string>>("service", true);
+ var prx = ignite.GetServices().GetServiceProxy<IMapService<int, string>>(ServiceName, true);
for (var i = 0; i < 10; i++)
prx.Put(i, i.ToString());
@@ -70,5 +58,21 @@ namespace Apache.Ignite.Examples.Services
Console.WriteLine(">>> Example finished, press any key to exit ...");
Console.ReadKey();
}
+
+ /// <summary>
+ /// Interface for service proxy interaction.
+ /// Actual service class (<see cref="MapService{TK,TV}"/>) does not have to implement this interface.
+ /// Target method/property will be searched by signature (name, arguments).
+ /// </summary>
+ public interface IMapService<TK, TV>
+ {
+ void Put(TK key, TV value);
+
+ TV Get(TK key);
+
+ void Clear();
+
+ int Size { get; }
+ }
}
}
diff --git a/modules/platforms/dotnet/examples/Thick/Misc/Services/Services.csproj b/modules/platforms/dotnet/examples/Thick/Misc/Services/Services.csproj
new file mode 100644
index 0000000..ec3ba31
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Misc/Services/Services.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Misc.Services</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Thick/README.md b/modules/platforms/dotnet/examples/Thick/README.md
new file mode 100644
index 0000000..7cec34f
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/README.md
@@ -0,0 +1,4 @@
+# Ignite.NET Thick API Examples
+
+Thick API starts the JVM and runs a full-fledged Ignite node in the current process.
+Thick mode is required for server-side user code execution, such as remote query filters, services, compute, and more.
diff --git a/modules/platforms/dotnet/examples/Thick/Sql/Ddl/Ddl.csproj b/modules/platforms/dotnet/examples/Thick/Sql/Ddl/Ddl.csproj
new file mode 100644
index 0000000..aa7e875
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Sql/Ddl/Ddl.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Sql.Ddl</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlDdlExample.cs b/modules/platforms/dotnet/examples/Thick/Sql/Ddl/Program.cs
similarity index 77%
copy from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlDdlExample.cs
copy to modules/platforms/dotnet/examples/Thick/Sql/Ddl/Program.cs
index 64d267d..d8e26c4 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlDdlExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Sql/Ddl/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,50 +15,37 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Sql
+namespace Apache.Ignite.Examples.Thick.Sql.Ddl
{
using System;
using Apache.Ignite.Core;
using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.Core.Cache.Query;
+ using Apache.Ignite.Examples.Shared;
/// <summary>
- /// This example showcases DDL capabilities of Ignite's SQL engine.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config
- /// 2) Start example.
+ /// This example showcases DDL capabilities of the Ignite SQL engine.
/// </summary>
- public class SqlDdlExample
+ public static class Program
{
- /// <summary>Dummy cache name.</summary>
- private const string DummyCacheName = "dummy_cache";
-
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgnite ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Cache query DDL example started.");
-
+
// Create dummy cache to act as an entry point for SQL queries (new SQL API which do not require this
// will appear in future versions, JDBC and ODBC drivers do not require it already).
- var cacheCfg = new CacheConfiguration(DummyCacheName)
+ var cacheCfg = new CacheConfiguration("dummy_cache")
{
SqlSchema = "PUBLIC",
CacheMode = CacheMode.Replicated
};
ICache<object, object> cache = ignite.GetOrCreateCache<object, object>(cacheCfg);
-
+
// Create reference City table based on REPLICATED template.
cache.Query(new SqlFieldsQuery(
"CREATE TABLE city (id LONG PRIMARY KEY, name VARCHAR) WITH \"template=replicated\"")).GetAll();
@@ -70,24 +57,24 @@ namespace Apache.Ignite.Examples.Sql
// Create an index.
cache.Query(new SqlFieldsQuery("CREATE INDEX on Person (city_id)")).GetAll();
-
+
Console.WriteLine("\n>>> Created database objects.");
const string addCity = "INSERT INTO city (id, name) VALUES (?, ?)";
-
+
cache.Query(new SqlFieldsQuery(addCity, 1L, "Forest Hill"));
cache.Query(new SqlFieldsQuery(addCity, 2L, "Denver"));
cache.Query(new SqlFieldsQuery(addCity, 3L, "St. Petersburg"));
const string addPerson = "INSERT INTO person (id, name, city_id) values (?, ?, ?)";
-
+
cache.Query(new SqlFieldsQuery(addPerson, 1L, "John Doe", 3L));
cache.Query(new SqlFieldsQuery(addPerson, 2L, "Jane Roe", 2L));
cache.Query(new SqlFieldsQuery(addPerson, 3L, "Mary Major", 1L));
cache.Query(new SqlFieldsQuery(addPerson, 4L, "Richard Miles", 2L));
-
+
Console.WriteLine("\n>>> Populated data.");
-
+
IFieldsQueryCursor res = cache.Query(new SqlFieldsQuery(
"SELECT p.name, c.name FROM Person p INNER JOIN City c on c.id = p.city_id"));
@@ -97,7 +84,7 @@ namespace Apache.Ignite.Examples.Sql
{
Console.WriteLine("{0}, {1}", row[0], row[1]);
}
-
+
cache.Query(new SqlFieldsQuery("drop table Person")).GetAll();
cache.Query(new SqlFieldsQuery("drop table City")).GetAll();
@@ -109,4 +96,4 @@ namespace Apache.Ignite.Examples.Sql
Console.ReadKey();
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/platforms/dotnet/examples/Thick/Sql/Dml/Dml.csproj b/modules/platforms/dotnet/examples/Thick/Sql/Dml/Dml.csproj
new file mode 100644
index 0000000..93b3848
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Sql/Dml/Dml.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Sql.Dml</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlDmlExample.cs b/modules/platforms/dotnet/examples/Thick/Sql/Dml/Program.cs
similarity index 80%
copy from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlDmlExample.cs
copy to modules/platforms/dotnet/examples/Thick/Sql/Dml/Program.cs
index 7b84fc34..ffca5d7 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlDmlExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Sql/Dml/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,40 +15,28 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Sql
+namespace Apache.Ignite.Examples.Thick.Sql.Dml
{
using System;
using Apache.Ignite.Core;
using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.Core.Cache.Query;
- using Apache.Ignite.ExamplesDll.Binary;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Models;
/// <summary>
- /// This example showcases DML capabilities of Ignite's SQL engine.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config
- /// 2) Start example.
+ /// This example showcases DML capabilities of the Ignite SQL engine.
/// </summary>
- public class SqlDmlExample
+ public static class Program
{
- /// <summary>Organization cache name.</summary>
private const string OrganizationCacheName = "dotnet_cache_query_dml_organization";
- /// <summary>Employee cache name.</summary>
private const string EmployeeCacheName = "dotnet_cache_query_dml_employee";
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (var ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Cache query DML example started.");
@@ -82,8 +70,6 @@ namespace Apache.Ignite.Examples.Sql
/// <summary>
/// Selects and displays Employee data.
/// </summary>
- /// <param name="employeeCache">Employee cache.</param>
- /// <param name="message">Message.</param>
private static void Select(ICache<int, Employee> employeeCache, string message)
{
Console.WriteLine("\n>>> {0}", message);
@@ -107,10 +93,8 @@ namespace Apache.Ignite.Examples.Sql
}
/// <summary>
- /// Populate cache with test data.
+ /// Populates cache with test data.
/// </summary>
- /// <param name="organizationCache">Organization cache.</param>
- /// <param name="employeeCache">Employee cache.</param>
private static void Insert(ICache<int, Organization> organizationCache, ICache<int, Employee> employeeCache)
{
// Insert organizations.
diff --git a/modules/platforms/dotnet/examples/Thick/Sql/Linq/Linq.csproj b/modules/platforms/dotnet/examples/Thick/Sql/Linq/Linq.csproj
new file mode 100644
index 0000000..ae0b153
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Sql/Linq/Linq.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Sql.Linq</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/LinqExample.cs b/modules/platforms/dotnet/examples/Thick/Sql/Linq/Program.cs
similarity index 76%
copy from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/LinqExample.cs
copy to modules/platforms/dotnet/examples/Thick/Sql/Linq/Program.cs
index 9a71fca..b97cb65 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/LinqExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Sql/Linq/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Sql
+namespace Apache.Ignite.Examples.Thick.Sql.Linq
{
using System;
using System.Linq;
@@ -24,50 +24,42 @@ namespace Apache.Ignite.Examples.Sql
using Apache.Ignite.Core.Cache.Affinity;
using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.Core.Cache.Query;
- using Apache.Ignite.ExamplesDll.Binary;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Models;
using Apache.Ignite.Linq;
/// <summary>
- /// This example populates cache with sample data and runs several LINQ queries over this data.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config
- /// 2) Start example.
+ /// This example demonstrates strongly-typed SQL queries with Ignite LINQ provider.
/// </summary>
- public class LinqExample
+ public static class Program
{
- /// <summary>Organization cache name.</summary>
private const string OrganizationCacheName = "dotnet_cache_query_organization";
- /// <summary>Employee cache name.</summary>
private const string EmployeeCacheName = "dotnet_cache_query_employee";
- /// <summary>Colocated employee cache name.</summary>
private const string EmployeeCacheNameColocated = "dotnet_cache_query_employee_colocated";
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (var ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Cache LINQ example started.");
var employeeCache = ignite.GetOrCreateCache<int, Employee>(
- new CacheConfiguration(EmployeeCacheName, new QueryEntity(typeof(int), typeof(Employee))));
+ new CacheConfiguration(
+ EmployeeCacheName,
+ new QueryEntity(typeof(int), typeof(Employee))));
var employeeCacheColocated = ignite.GetOrCreateCache<AffinityKey, Employee>(
- new CacheConfiguration(EmployeeCacheNameColocated,
+ new CacheConfiguration(
+ EmployeeCacheNameColocated,
new QueryEntity(typeof(AffinityKey), typeof(Employee))));
var organizationCache = ignite.GetOrCreateCache<int, Organization>(
- new CacheConfiguration(OrganizationCacheName, new QueryEntity(typeof(int), typeof(Organization))));
+ new CacheConfiguration(
+ OrganizationCacheName,
+ new QueryEntity(typeof(int), typeof(Organization))));
// Populate cache with sample data entries.
PopulateCache(employeeCache);
@@ -97,10 +89,6 @@ namespace Apache.Ignite.Examples.Sql
Console.ReadKey();
}
- /// <summary>
- /// Queries employees that have provided ZIP code in address.
- /// </summary>
- /// <param name="cache">Cache.</param>
private static void QueryExample(ICache<int, Employee> cache)
{
const int zip = 94109;
@@ -109,16 +97,14 @@ namespace Apache.Ignite.Examples.Sql
cache.AsCacheQueryable().Where(emp => emp.Value.Address.Zip == zip);
Console.WriteLine();
- Console.WriteLine(">>> Employees with zipcode " + zip + ":");
+ Console.WriteLine($">>> Employees with zipcode {zip}:");
foreach (ICacheEntry<int, Employee> entry in qry)
Console.WriteLine(">>> " + entry.Value);
+
+ Console.WriteLine($">>> Generated SQL: {qry.ToCacheQueryable().GetFieldsQuery().Sql}");
}
- /// <summary>
- /// Queries employees that have provided ZIP code in address with a compiled query.
- /// </summary>
- /// <param name="cache">Cache.</param>
private static void CompiledQueryExample(ICache<int, Employee> cache)
{
const int zip = 94109;
@@ -136,11 +122,6 @@ namespace Apache.Ignite.Examples.Sql
Console.WriteLine(">>> " + entry.Value);
}
- /// <summary>
- /// Queries employees that work for organization with provided name.
- /// </summary>
- /// <param name="employeeCache">Employee cache.</param>
- /// <param name="organizationCache">Organization cache.</param>
private static void JoinQueryExample(ICache<AffinityKey, Employee> employeeCache,
ICache<int, Organization> organizationCache)
{
@@ -157,17 +138,14 @@ namespace Apache.Ignite.Examples.Sql
Console.WriteLine();
- Console.WriteLine(">>> Employees working for " + orgName + ":");
+ Console.WriteLine($">>> Employees working for {orgName}:");
foreach (ICacheEntry<AffinityKey, Employee> entry in qry)
Console.WriteLine(">>> " + entry.Value);
+
+ Console.WriteLine($">>> Generated SQL: {qry.ToCacheQueryable().GetFieldsQuery().Sql}");
}
- /// <summary>
- /// Queries employees that work for organization with provided name.
- /// </summary>
- /// <param name="employeeCache">Employee cache.</param>
- /// <param name="organizationCache">Organization cache.</param>
private static void DistributedJoinQueryExample(ICache<int, Employee> employeeCache,
ICache<int, Organization> organizationCache)
{
@@ -190,16 +168,14 @@ namespace Apache.Ignite.Examples.Sql
Console.WriteLine();
- Console.WriteLine(">>> Employees working for " + orgName + ":");
+ Console.WriteLine($">>> Employees working for {orgName} using distributed joins:");
foreach (ICacheEntry<int, Employee> entry in qry)
Console.WriteLine(">>> " + entry.Value);
+
+ Console.WriteLine($">>> Generated SQL: {qry.ToCacheQueryable().GetFieldsQuery().Sql}");
}
- /// <summary>
- /// Queries names and salaries for all employees.
- /// </summary>
- /// <param name="cache">Cache.</param>
private static void FieldsQueryExample(ICache<int, Employee> cache)
{
var qry = cache.AsCacheQueryable().Select(entry => new {entry.Value.Name, entry.Value.Salary});
@@ -208,13 +184,11 @@ namespace Apache.Ignite.Examples.Sql
Console.WriteLine(">>> Employee names and their salaries:");
foreach (var row in qry)
- Console.WriteLine(">>> [Name=" + row.Name + ", salary=" + row.Salary + ']');
+ Console.WriteLine($">>> [Name={row.Name}, salary={row.Salary}{']'}");
+
+ Console.WriteLine($">>> Generated SQL: {qry.ToCacheQueryable().GetFieldsQuery().Sql}");
}
- /// <summary>
- /// Populate cache with data for this example.
- /// </summary>
- /// <param name="cache">Cache.</param>
private static void PopulateCache(ICache<int, Organization> cache)
{
cache.Put(1, new Organization(
@@ -230,10 +204,6 @@ namespace Apache.Ignite.Examples.Sql
DateTime.Now));
}
- /// <summary>
- /// Populate cache with data for this example.
- /// </summary>
- /// <param name="cache">Cache.</param>
private static void PopulateCache(ICache<AffinityKey, Employee> cache)
{
cache.Put(new AffinityKey(1, 1), new Employee(
@@ -286,10 +256,6 @@ namespace Apache.Ignite.Examples.Sql
2));
}
- /// <summary>
- /// Populate cache with data for this example.
- /// </summary>
- /// <param name="cache">Cache.</param>
private static void PopulateCache(ICache<int, Employee> cache)
{
cache.Put(1, new Employee(
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs b/modules/platforms/dotnet/examples/Thick/Sql/Sql/Program.cs
similarity index 81%
copy from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs
copy to modules/platforms/dotnet/examples/Thick/Sql/Sql/Program.cs
index 20de310..3d39451 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs
+++ b/modules/platforms/dotnet/examples/Thick/Sql/Sql/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Sql
+namespace Apache.Ignite.Examples.Thick.Sql.Sql
{
using System;
using Apache.Ignite.Core;
@@ -23,39 +23,26 @@ namespace Apache.Ignite.Examples.Sql
using Apache.Ignite.Core.Cache.Affinity;
using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.Core.Cache.Query;
- using Apache.Ignite.ExamplesDll.Binary;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Models;
/// <summary>
- /// This example populates cache with sample data and runs SQL queries.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config
- /// 2) Start example.
+ /// This example demonstrates SQL queries.
/// </summary>
- public class SqlExample
+ public static class Program
{
- /// <summary>Organization cache name.</summary>
private const string OrganizationCacheName = "dotnet_cache_query_organization";
- /// <summary>Employee cache name.</summary>
private const string EmployeeCacheName = "dotnet_cache_query_employee";
- /// <summary>Employee cache name.</summary>
private const string EmployeeCacheNameColocated = "dotnet_cache_query_employee_colocated";
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (var ignite = Ignition.Start(Utils.GetServerNodeConfiguration()))
{
Console.WriteLine();
- Console.WriteLine(">>> Cache query example started.");
+ Console.WriteLine(">>> Cache SQL example started.");
var employeeCache = ignite.GetOrCreateCache<int, Employee>(
new CacheConfiguration(EmployeeCacheName, new QueryEntity(typeof(int), typeof(Employee))));
@@ -89,10 +76,6 @@ namespace Apache.Ignite.Examples.Sql
Console.ReadKey();
}
- /// <summary>
- /// Queries employees that have provided ZIP code in address.
- /// </summary>
- /// <param name="cache">Cache.</param>
private static void SqlQueryExample(ICache<int, Employee> cache)
{
const int zip = 94109;
@@ -106,10 +89,6 @@ namespace Apache.Ignite.Examples.Sql
Console.WriteLine(">>> [Name=" + row[0] + ", salary=" + row[1] + ']');
}
- /// <summary>
- /// Queries employees that work for organization with provided name.
- /// </summary>
- /// <param name="cache">Cache.</param>
private static void SqlJoinQueryExample(ICache<AffinityKey, Employee> cache)
{
const string orgName = "Apache";
@@ -125,10 +104,6 @@ namespace Apache.Ignite.Examples.Sql
Console.WriteLine(">>> " + entry[0]);
}
- /// <summary>
- /// Queries employees that work for organization with provided name.
- /// </summary>
- /// <param name="cache">Cache.</param>
private static void SqlDistributedJoinQueryExample(ICache<int, Employee> cache)
{
const string orgName = "Apache";
@@ -148,10 +123,6 @@ namespace Apache.Ignite.Examples.Sql
Console.WriteLine(">>> " + entry[0]);
}
- /// <summary>
- /// Populate cache with data for this example.
- /// </summary>
- /// <param name="cache">Cache.</param>
private static void PopulateCache(ICache<int, Organization> cache)
{
cache.Put(1, new Organization(
@@ -166,10 +137,6 @@ namespace Apache.Ignite.Examples.Sql
DateTime.Now));
}
- /// <summary>
- /// Populate cache with data for this example.
- /// </summary>
- /// <param name="cache">Cache.</param>
private static void PopulateCache(ICache<AffinityKey, Employee> cache)
{
cache.Put(new AffinityKey(1, 1), new Employee(
@@ -222,10 +189,6 @@ namespace Apache.Ignite.Examples.Sql
2));
}
- /// <summary>
- /// Populate cache with data for this example.
- /// </summary>
- /// <param name="cache">Cache.</param>
private static void PopulateCache(ICache<int, Employee> cache)
{
cache.Put(1, new Employee(
diff --git a/modules/platforms/dotnet/examples/Thick/Sql/Sql/Sql.csproj b/modules/platforms/dotnet/examples/Thick/Sql/Sql/Sql.csproj
new file mode 100644
index 0000000..4c35c0e
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thick/Sql/Sql/Sql.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thick.Sql.Sql</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Thin/Cache/BinaryModeThin/BinaryModeThin.csproj b/modules/platforms/dotnet/examples/Thin/Cache/BinaryModeThin/BinaryModeThin.csproj
new file mode 100644
index 0000000..939aa8a
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thin/Cache/BinaryModeThin/BinaryModeThin.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thin.Cache.BinaryModeThin</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs b/modules/platforms/dotnet/examples/Thin/Cache/BinaryModeThin/Program.cs
similarity index 77%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs
rename to modules/platforms/dotnet/examples/Thin/Cache/BinaryModeThin/Program.cs
index 605892a..9c2415f 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs
+++ b/modules/platforms/dotnet/examples/Thin/Cache/BinaryModeThin/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,58 +15,49 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Datagrid
+namespace Apache.Ignite.Examples.Thin.Cache.BinaryModeThin
{
using System;
using Apache.Ignite.Core;
using Apache.Ignite.Core.Binary;
- using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.Core.Cache.Query;
+ using Apache.Ignite.Core.Client;
+ using Apache.Ignite.Core.Client.Cache;
+ using Apache.Ignite.Examples.Shared;
/// <summary>
- /// This example works with cache entirely in binary mode: no classes or configurations are needed.
+ /// This example works with cache entirely in binary mode: no classes are needed.
/// <para />
- /// 1) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 2) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config
- /// 2) Start example.
+ /// This example requires an Ignite server node. You can start the node in any of the following ways:
+ /// * docker run -p 10800:10800 apacheignite/ignite
+ /// * dotnet run -p ServerNode.csproj
+ /// * ignite.sh/ignite.bat from the distribution
/// </summary>
- public class BinaryModeExample
+ public static class Program
{
- /// <summary>Cache name.</summary>
private const string CacheName = "dotnet_binary_cache";
- /// <summary>Person type name.</summary>
private const string PersonType = "Person";
- /// <summary>Company type name.</summary>
private const string CompanyType = "Company";
- /// <summary>Name field name.</summary>
private const string NameField = "Name";
-
- /// <summary>Company ID field name.</summary>
+
private const string CompanyIdField = "CompanyId";
- /// <summary>ID field name.</summary>
private const string IdField = "Id";
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgniteClient ignite = Ignition.StartClient(Utils.GetThinClientConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Binary mode example started.");
// Create new cache and configure queries for Person and Company binary types.
// Note that there are no such classes defined.
- var cache0 = ignite.GetOrCreateCache<object, object>(new CacheConfiguration
+ var cache0 = ignite.GetOrCreateCache<object, object>(new CacheClientConfiguration
{
Name = CacheName,
QueryEntities = new[]
@@ -106,7 +97,7 @@ namespace Apache.Ignite.Examples.Datagrid
cache.Clear();
// Populate cache with sample data entries.
- PopulateCache(cache);
+ PopulateCache(cache, ignite.GetBinary());
// Run read & modify example.
ReadModifyExample(cache);
@@ -117,9 +108,6 @@ namespace Apache.Ignite.Examples.Datagrid
// Run SQL query with join example.
SqlJoinQueryExample(cache);
- // Run full text query example.
- FullTextQueryExample(cache);
-
Console.WriteLine();
}
@@ -128,11 +116,12 @@ namespace Apache.Ignite.Examples.Datagrid
Console.ReadKey();
}
+
/// <summary>
/// Reads binary object fields and modifies them.
/// </summary>
/// <param name="cache">Cache.</param>
- private static void ReadModifyExample(ICache<int, IBinaryObject> cache)
+ private static void ReadModifyExample(ICacheClient<int, IBinaryObject> cache)
{
const int id = 1;
@@ -153,7 +142,7 @@ namespace Apache.Ignite.Examples.Datagrid
/// Queries names for all persons.
/// </summary>
/// <param name="cache">Cache.</param>
- private static void SqlQueryExample(ICache<int, IBinaryObject> cache)
+ private static void SqlQueryExample(ICacheClient<int, IBinaryObject> cache)
{
var qry = cache.Query(new SqlFieldsQuery("select name from Person order by name"));
@@ -168,7 +157,7 @@ namespace Apache.Ignite.Examples.Datagrid
/// Queries persons that work for company with provided name.
/// </summary>
/// <param name="cache">Cache.</param>
- private static void SqlJoinQueryExample(ICache<int, IBinaryObject> cache)
+ private static void SqlJoinQueryExample(ICacheClient<int, IBinaryObject> cache)
{
const string orgName = "Apache";
@@ -188,28 +177,10 @@ namespace Apache.Ignite.Examples.Datagrid
}
/// <summary>
- /// Queries persons that have a specific name using full-text query API.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void FullTextQueryExample(ICache<int, IBinaryObject> cache)
- {
- var qry = cache.Query(new TextQuery(PersonType, "Peters"));
-
- Console.WriteLine();
- Console.WriteLine(">>> Persons named Peters:");
-
- foreach (var entry in qry)
- Console.WriteLine(">>> " + entry.Value);
- }
-
- /// <summary>
/// Populate cache with data for this example.
/// </summary>
- /// <param name="cache">Cache.</param>
- private static void PopulateCache(ICache<int, IBinaryObject> cache)
+ private static void PopulateCache(ICacheClient<int, IBinaryObject> cache, IBinary binary)
{
- IBinary binary = cache.Ignite.GetBinary();
-
// Populate persons.
cache[1] = binary.GetBuilder(PersonType)
.SetField(NameField, "James Wilson")
diff --git a/modules/platforms/dotnet/examples/Thin/Cache/OptimisticTransactionThin/OptimisticTransactionThin.csproj b/modules/platforms/dotnet/examples/Thin/Cache/OptimisticTransactionThin/OptimisticTransactionThin.csproj
new file mode 100644
index 0000000..9bee755
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thin/Cache/OptimisticTransactionThin/OptimisticTransactionThin.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thin.Cache.OptimisticTransactionThin</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/OptimisticTransactionExample.cs b/modules/platforms/dotnet/examples/Thin/Cache/OptimisticTransactionThin/Program.cs
similarity index 66%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/OptimisticTransactionExample.cs
rename to modules/platforms/dotnet/examples/Thin/Cache/OptimisticTransactionThin/Program.cs
index 0f4f149..8ab55a5 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/OptimisticTransactionExample.cs
+++ b/modules/platforms/dotnet/examples/Thin/Cache/OptimisticTransactionThin/Program.cs
@@ -15,45 +15,43 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Datagrid
+namespace Apache.Ignite.Examples.Thin.Cache.OptimisticTransactionThin
{
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.Client;
+ using Apache.Ignite.Core.Client.Cache;
+ using Apache.Ignite.Core.Client.Transactions;
using Apache.Ignite.Core.Transactions;
+ using Apache.Ignite.Examples.Shared;
/// <summary>
/// This example demonstrates optimistic transaction concurrency control.
/// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
+ /// This example requires an Ignite server node. You can start the node in any of the following ways:
+ /// * docker run -p 10800:10800 apacheignite/ignite
+ /// * dotnet run -p ServerNode.csproj
+ /// * ignite.sh/ignite.bat from the distribution
/// </summary>
- public class OptimisticTransactionExample
+ public static class Program
{
- /// <summary>Cache name.</summary>
private const string CacheName = "dotnet_optimistic_tx_example";
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgniteClient ignite = Ignition.StartClient(Utils.GetThinClientConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Optimistic transaction example started.");
// Create Transactional cache.
- var cacheCfg = new CacheConfiguration(CacheName) { AtomicityMode = CacheAtomicityMode.Transactional };
+ var cacheCfg = new CacheClientConfiguration(CacheName)
+ {
+ AtomicityMode = CacheAtomicityMode.Transactional
+ };
var cache = ignite.GetOrCreateCache<int, int>(cacheCfg);
@@ -61,8 +59,9 @@ namespace Apache.Ignite.Examples.Datagrid
cache[1] = 0;
// Increment a value in parallel within a transaction.
- var task1 = Task.Factory.StartNew(() => IncrementCacheValue(cache, 1));
- var task2 = Task.Factory.StartNew(() => IncrementCacheValue(cache, 2));
+ var transactions = ignite.GetTransactions();
+ var task1 = Task.Factory.StartNew(() => IncrementCacheValue(cache, transactions, 1));
+ var task2 = Task.Factory.StartNew(() => IncrementCacheValue(cache, transactions, 2));
Task.WaitAll(task1, task2);
@@ -78,14 +77,13 @@ namespace Apache.Ignite.Examples.Datagrid
/// <summary>
/// Increments the cache value within a transaction.
/// </summary>
- /// <param name="cache">The cache.</param>
- /// <param name="threadId">The thread identifier.</param>
- private static void IncrementCacheValue(ICache<int, int> cache, int threadId)
+ private static void IncrementCacheValue(
+ ICacheClient<int, int> cache,
+ ITransactionsClient transactions,
+ int threadId)
{
try
{
- var transactions = cache.Ignite.GetTransactions();
-
using (var tx = transactions.TxStart(TransactionConcurrency.Optimistic,
TransactionIsolation.Serializable))
{
@@ -100,11 +98,11 @@ namespace Apache.Ignite.Examples.Datagrid
Console.WriteLine("\n>>> Thread {0} successfully incremented cached value.", threadId);
}
- catch (TransactionOptimisticException ex)
+ catch (IgniteClientException ex)
{
Console.WriteLine("\n>>> Thread {0} failed to increment cached value. " +
"Caught an expected optimistic exception: {1}", threadId, ex.Message);
}
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs b/modules/platforms/dotnet/examples/Thin/Cache/PutGetThin/Program.cs
similarity index 77%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs
rename to modules/platforms/dotnet/examples/Thin/Cache/PutGetThin/Program.cs
index d07c58d..ba0c425 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs
+++ b/modules/platforms/dotnet/examples/Thin/Cache/PutGetThin/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,44 +15,33 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Datagrid
+namespace Apache.Ignite.Examples.Thin.Cache.PutGetThin
{
using System;
using System.Collections.Generic;
using Apache.Ignite.Core;
using Apache.Ignite.Core.Binary;
using Apache.Ignite.Core.Cache;
- using Apache.Ignite.ExamplesDll.Binary;
-
- /// <summary>
- /// This example demonstrates several put-get operations on Ignite cache
- /// with binary values. Note that binary object can be retrieved in
- /// fully-deserialized form or in binary object format using special
- /// cache projection.
- /// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
- /// </summary>
- public class PutGetExample
- {
- /// <summary>Cache name.</summary>
- private const string CacheName = "dotnet_cache_put_get";
+ using Apache.Ignite.Core.Client;
+ using Apache.Ignite.Core.Client.Cache;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Models;
+ public static class Program
+ {
/// <summary>
- /// Runs the example.
+ /// Put/Get example.
+ /// <para />
+ /// This example requires an Ignite server node. You can start the node in any of the following ways:
+ /// * docker run -p 10800:10800 apacheignite/ignite
+ /// * dotnet run -p ServerNode.csproj
+ /// * ignite.sh/ignite.bat from the distribution
/// </summary>
- [STAThread]
+ private const string CacheName = "dotnet_cache_put_get";
+
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgniteClient ignite = Ignition.StartClient(Utils.GetThinClientConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Cache put-get example started.");
@@ -77,9 +66,9 @@ namespace Apache.Ignite.Examples.Datagrid
/// Execute individual Put and Get.
/// </summary>
/// <param name="ignite">Ignite instance.</param>
- private static void PutGet(IIgnite ignite)
+ private static void PutGet(IIgniteClient ignite)
{
- var cache = ignite.GetCache<int, Organization>(CacheName);
+ ICacheClient<int, Organization> cache = ignite.GetCache<int, Organization>(CacheName);
// Create new Organization to store in cache.
Organization org = new Organization(
@@ -103,9 +92,9 @@ namespace Apache.Ignite.Examples.Datagrid
/// Execute individual Put and Get, getting value in binary format, without de-serializing it.
/// </summary>
/// <param name="ignite">Ignite instance.</param>
- private static void PutGetBinary(IIgnite ignite)
+ private static void PutGetBinary(IIgniteClient ignite)
{
- var cache = ignite.GetCache<int, Organization>(CacheName);
+ ICacheClient<int, Organization> cache = ignite.GetCache<int, Organization>(CacheName);
// Create new Organization to store in cache.
Organization org = new Organization(
@@ -135,9 +124,9 @@ namespace Apache.Ignite.Examples.Datagrid
/// Execute bulk Put and Get operations.
/// </summary>
/// <param name="ignite">Ignite instance.</param>
- private static void PutAllGetAll(IIgnite ignite)
+ private static void PutAllGetAll(IIgniteClient ignite)
{
- var cache = ignite.GetCache<int, Organization>(CacheName);
+ ICacheClient<int, Organization> cache = ignite.GetCache<int, Organization>(CacheName);
// Create new Organizations to store in cache.
Organization org1 = new Organization(
@@ -173,9 +162,9 @@ namespace Apache.Ignite.Examples.Datagrid
/// Execute bulk Put and Get operations getting values in binary format, without de-serializing it.
/// </summary>
/// <param name="ignite">Ignite instance.</param>
- private static void PutAllGetAllBinary(IIgnite ignite)
+ private static void PutAllGetAllBinary(IIgniteClient ignite)
{
- var cache = ignite.GetCache<int, Organization>(CacheName);
+ ICacheClient<int, Organization> cache = ignite.GetCache<int, Organization>(CacheName);
// Create new Organizations to store in cache.
Organization org1 = new Organization(
diff --git a/modules/platforms/dotnet/examples/Thin/Cache/PutGetThin/PutGetThin.csproj b/modules/platforms/dotnet/examples/Thin/Cache/PutGetThin/PutGetThin.csproj
new file mode 100644
index 0000000..834182b
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thin/Cache/PutGetThin/PutGetThin.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thin.Cache.PutGetThin</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/ContinuousQueryExample.cs b/modules/platforms/dotnet/examples/Thin/Cache/QueryContinuousThin/Program.cs
similarity index 64%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/ContinuousQueryExample.cs
rename to modules/platforms/dotnet/examples/Thin/Cache/QueryContinuousThin/Program.cs
index d2e2726..9f595a8 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/ContinuousQueryExample.cs
+++ b/modules/platforms/dotnet/examples/Thin/Cache/QueryContinuousThin/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,42 +15,32 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Datagrid
+namespace Apache.Ignite.Examples.Thin.Cache.QueryContinuousThin
{
using System;
using System.Collections.Generic;
using System.Threading;
using Apache.Ignite.Core;
using Apache.Ignite.Core.Cache.Event;
- using Apache.Ignite.Core.Cache.Query.Continuous;
- using Apache.Ignite.ExamplesDll.Datagrid;
+ using Apache.Ignite.Core.Client;
+ using Apache.Ignite.Core.Client.Cache.Query.Continuous;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Cache;
/// <summary>
- /// This example demonstrates continuous query API.
+ /// This example demonstrates how continuous query provides a way to subscribe to cache updates.
/// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
+ /// This example requires an Ignite server node with <see cref="ContinuousQueryFilter"/> type loaded,
+ /// run ServerNode project to start it:
+ /// * dotnet run -p ServerNode.csproj
/// </summary>
- public class ContinuousQueryExample
+ public static class Program
{
- /// <summary>Cache name.</summary>
private const string CacheName = "dotnet_cache_continuous_query";
- /// <summary>
- /// Runs the example.
- /// </summary>
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgniteClient ignite = Ignition.StartClient(Utils.GetThinClientConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Cache continuous query example started.");
@@ -65,8 +55,11 @@ namespace Apache.Ignite.Examples.Datagrid
for (int i = 0; i < keyCnt; i++)
cache.Put(i, i.ToString());
- var qry = new ContinuousQuery<int, string>(new Listener<string>(), new ContinuousQueryFilter(15));
-
+ var qry = new ContinuousQueryClient<int, string>
+ {
+ Listener = new Listener<string>(),
+ Filter = new ContinuousQueryFilter(15)
+ };
// Create new continuous query.
using (cache.QueryContinuous(qry))
@@ -86,7 +79,7 @@ namespace Apache.Ignite.Examples.Datagrid
}
/// <summary>
- /// Callback for continuous query example.
+ /// Continuous query event handler.
/// </summary>
private class Listener<T> : ICacheEntryEventListener<int, T>
{
diff --git a/modules/platforms/dotnet/examples/Thin/Cache/QueryContinuousThin/QueryContinuousThin.csproj b/modules/platforms/dotnet/examples/Thin/Cache/QueryContinuousThin/QueryContinuousThin.csproj
new file mode 100644
index 0000000..4732ebc
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thin/Cache/QueryContinuousThin/QueryContinuousThin.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thin.Cache.QueryContinuousThin</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Thin/Cache/QueryScanThin/Program.cs b/modules/platforms/dotnet/examples/Thin/Cache/QueryScanThin/Program.cs
new file mode 100644
index 0000000..e7087d7
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thin/Cache/QueryScanThin/Program.cs
@@ -0,0 +1,71 @@
+/*
+ * 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.Examples.Thin.Cache.QueryScanThin
+{
+ using System;
+ using Apache.Ignite.Core;
+ using Apache.Ignite.Core.Cache.Configuration;
+ using Apache.Ignite.Core.Cache.Query;
+ using Apache.Ignite.Core.Client;
+ using Apache.Ignite.Core.Client.Cache;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Cache;
+ using Apache.Ignite.Examples.Shared.Models;
+
+ /// <summary>
+ /// This example demonstrates a Scan query with a remote filter.
+ /// <para />
+ /// This example requires an Ignite server node with <see cref="ScanQueryFilter"/> type loaded,
+ /// run ServerNode project to start it:
+ /// * dotnet run -p ServerNode.csproj
+ /// </summary>
+ public static class Program
+ {
+ private const string EmployeeCacheName = "dotnet_cache_query_employee";
+
+ public static void Main()
+ {
+ using (IIgniteClient ignite = Ignition.StartClient(Utils.GetThinClientConfiguration()))
+ {
+ Console.WriteLine();
+ Console.WriteLine(">>> Cache scan query example started.");
+
+ var employeeCache = ignite.GetOrCreateCache<int, Employee>(
+ new CacheClientConfiguration(EmployeeCacheName, new QueryEntity(typeof(int), typeof(Employee))));
+
+ Utils.PopulateCache(employeeCache);
+
+ const int zip = 94109;
+
+ var qry = employeeCache.Query(new ScanQuery<int, Employee>(new ScanQueryFilter(zip)));
+
+ Console.WriteLine();
+ Console.WriteLine(">>> Employees with zipcode {0} (scan):", zip);
+
+ foreach (var entry in qry)
+ Console.WriteLine(">>> " + entry.Value);
+
+ Console.WriteLine();
+ }
+
+ Console.WriteLine();
+ Console.WriteLine(">>> Example finished, press any key to exit ...");
+ Console.ReadKey();
+ }
+ }
+}
diff --git a/modules/platforms/dotnet/examples/Thin/Cache/QueryScanThin/QueryScanThin.csproj b/modules/platforms/dotnet/examples/Thin/Cache/QueryScanThin/QueryScanThin.csproj
new file mode 100644
index 0000000..235824c
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thin/Cache/QueryScanThin/QueryScanThin.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thin.Cache.QueryScanThin</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionExample.cs b/modules/platforms/dotnet/examples/Thin/Cache/TransactionThin/Program.cs
similarity index 71%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionExample.cs
rename to modules/platforms/dotnet/examples/Thin/Cache/TransactionThin/Program.cs
index 83d08ff..073e0e4 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionExample.cs
+++ b/modules/platforms/dotnet/examples/Thin/Cache/TransactionThin/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,47 +15,38 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Datagrid
+namespace Apache.Ignite.Examples.Thin.Cache.TransactionThin
{
using System;
using System.Transactions;
using Apache.Ignite.Core;
- using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cache.Configuration;
+ using Apache.Ignite.Core.Client;
+ using Apache.Ignite.Core.Client.Cache;
using Apache.Ignite.Core.Transactions;
- using Apache.Ignite.ExamplesDll.Binary;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Models;
/// <summary>
- /// This example demonstrates how to use transactions on Apache cache.
+ /// This example demonstrates transactional data updates.
/// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
+ /// This example requires an Ignite server node. You can start the node in any of the following ways:
+ /// * docker run -p 10800:10800 apacheignite/ignite
+ /// * dotnet run -p ServerNode.csproj
+ /// * ignite.sh/ignite.bat from the distribution
/// </summary>
- public class TransactionExample
+ public static class Program
{
- /// <summary>Cache name.</summary>
private const string CacheName = "dotnet_cache_tx";
- /// <summary>
- /// Runs the example.
- /// </summary>
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgniteClient ignite = Ignition.StartClient(Utils.GetThinClientConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Transaction example started.");
- var cache = ignite.GetOrCreateCache<int, Account>(new CacheConfiguration
+ var cache = ignite.GetOrCreateCache<int, Account>(new CacheClientConfiguration
{
Name = CacheName,
AtomicityMode = CacheAtomicityMode.Transactional
@@ -66,7 +57,7 @@ namespace Apache.Ignite.Examples.Datagrid
Console.WriteLine("\n>>> Transferring with Ignite transaction API...");
// Transfer money between accounts in a single transaction.
- using (var tx = cache.Ignite.GetTransactions().TxStart(TransactionConcurrency.Pessimistic,
+ using (var tx = ignite.GetTransactions().TxStart(TransactionConcurrency.Pessimistic,
TransactionIsolation.RepeatableRead))
{
Account acc1 = cache.Get(1);
@@ -113,7 +104,7 @@ namespace Apache.Ignite.Examples.Datagrid
/// <summary>
/// Displays accounts.
/// </summary>
- private static void DisplayAccounts(ICache<int, Account> cache)
+ private static void DisplayAccounts(ICacheClient<int, Account> cache)
{
Console.WriteLine(">>> Transfer finished.");
@@ -127,7 +118,7 @@ namespace Apache.Ignite.Examples.Datagrid
/// <summary>
/// Initializes account balance.
/// </summary>
- private static void InitAccounts(ICache<int, Account> cache)
+ private static void InitAccounts(ICacheClient<int, Account> cache)
{
// Clean up caches on all nodes before run.
cache.Clear();
diff --git a/modules/platforms/dotnet/examples/Thin/Cache/TransactionThin/TransactionThin.csproj b/modules/platforms/dotnet/examples/Thin/Cache/TransactionThin/TransactionThin.csproj
new file mode 100644
index 0000000..91e98ca
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thin/Cache/TransactionThin/TransactionThin.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thin.Cache.TransactionThin</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs b/modules/platforms/dotnet/examples/Thin/Misc/ServicesThin/Program.cs
similarity index 50%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs
rename to modules/platforms/dotnet/examples/Thin/Misc/ServicesThin/Program.cs
index 245356d..c45f05f 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs
+++ b/modules/platforms/dotnet/examples/Thin/Misc/ServicesThin/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,46 +15,37 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Services
+namespace Apache.Ignite.Examples.Thin.Misc.ServicesThin
{
using System;
using Apache.Ignite.Core;
- using Apache.Ignite.ExamplesDll.Services;
+ using Apache.Ignite.Core.Client;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Services;
/// <summary>
- /// Example demonstrating Ignite services.
+ /// This example demonstrates Ignite thin client service invocation.
+ /// Thin clients can invoke .NET and Java services, but can't deploy them.
/// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder.
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
- /// 2) Start example.
+ /// This example requires an Ignite server node with "default-map-service" deployed there,
+ /// run ServerNode project to start it:
+ /// * dotnet run -p ServerNode.csproj
/// </summary>
- public class ServicesExample
+ public static class Program
{
/// <summary>
- /// Runs the example.
+ /// This service is started in the ServerNode project.
/// </summary>
- [STAThread]
+ private const string ServiceName = "default-map-service";
+
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgniteClient ignite = Ignition.StartClient(Utils.GetThinClientConfiguration()))
{
Console.WriteLine(">>> Services example started.");
Console.WriteLine();
- // Deploy a service
- var svc = new MapService<int, string>();
- Console.WriteLine(">>> Deploying service to all nodes...");
- ignite.GetServices().DeployNodeSingleton("service", svc);
-
- // Get a sticky service proxy so that we will always be contacting the same remote node.
- var prx = ignite.GetServices().GetServiceProxy<IMapService<int, string>>("service", true);
+ var prx = ignite.GetServices().GetServiceProxy<IMapService<int, string>>(ServiceName);
for (var i = 0; i < 10; i++)
prx.Put(i, i.ToString());
@@ -62,13 +53,27 @@ namespace Apache.Ignite.Examples.Services
var mapSize = prx.Size;
Console.WriteLine(">>> Map service size: " + mapSize);
-
- ignite.GetServices().CancelAll();
}
Console.WriteLine();
Console.WriteLine(">>> Example finished, press any key to exit ...");
Console.ReadKey();
}
+
+ /// <summary>
+ /// Interface for service proxy interaction.
+ /// Actual service class (<see cref="MapService{TK,TV}"/>) does not have to implement this interface.
+ /// Target method/property will be searched by signature (name, arguments).
+ /// </summary>
+ public interface IMapService<TK, TV>
+ {
+ void Put(TK key, TV value);
+
+ TV Get(TK key);
+
+ void Clear();
+
+ int Size { get; }
+ }
}
}
diff --git a/modules/platforms/dotnet/examples/Thin/Misc/ServicesThin/ServicesThin.csproj b/modules/platforms/dotnet/examples/Thin/Misc/ServicesThin/ServicesThin.csproj
new file mode 100644
index 0000000..fdd7a3f
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thin/Misc/ServicesThin/ServicesThin.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thin.Misc.ServicesThin</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Thin/README.md b/modules/platforms/dotnet/examples/Thin/README.md
new file mode 100644
index 0000000..74776ef
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thin/README.md
@@ -0,0 +1,3 @@
+# Ignite.NET Thin Client Examples
+
+Ignite thin client is a lightweight alternative to the normal "thick" mode, it starts up quickly and consumes less RAM.
diff --git a/modules/platforms/dotnet/examples/Thin/Sql/DdlThin/DdlThin.csproj b/modules/platforms/dotnet/examples/Thin/Sql/DdlThin/DdlThin.csproj
new file mode 100644
index 0000000..e8c745e
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thin/Sql/DdlThin/DdlThin.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thin.Sql.DdlThin</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlDdlExample.cs b/modules/platforms/dotnet/examples/Thin/Sql/DdlThin/Program.cs
similarity index 74%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlDdlExample.cs
rename to modules/platforms/dotnet/examples/Thin/Sql/DdlThin/Program.cs
index 64d267d..64be9e1 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlDdlExample.cs
+++ b/modules/platforms/dotnet/examples/Thin/Sql/DdlThin/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,50 +15,43 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Sql
+namespace Apache.Ignite.Examples.Thin.Sql.DdlThin
{
using System;
using Apache.Ignite.Core;
- using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.Core.Cache.Query;
+ using Apache.Ignite.Core.Client;
+ using Apache.Ignite.Core.Client.Cache;
+ using Apache.Ignite.Examples.Shared;
/// <summary>
- /// This example showcases DDL capabilities of Ignite's SQL engine.
+ /// This example showcases DDL capabilities of the Ignite SQL engine with thin client.
/// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config
- /// 2) Start example.
+ /// This example requires an Ignite server node. You can start the node in any of the following ways:
+ /// * docker run -p 10800:10800 apacheignite/ignite
+ /// * dotnet run -p ServerNode.csproj
+ /// * ignite.sh/ignite.bat from the distribution
/// </summary>
- public class SqlDdlExample
+ public static class Program
{
- /// <summary>Dummy cache name.</summary>
- private const string DummyCacheName = "dummy_cache";
-
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (IIgniteClient ignite = Ignition.StartClient(Utils.GetThinClientConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Cache query DDL example started.");
-
+
// Create dummy cache to act as an entry point for SQL queries (new SQL API which do not require this
// will appear in future versions, JDBC and ODBC drivers do not require it already).
- var cacheCfg = new CacheConfiguration(DummyCacheName)
+ var cacheCfg = new CacheClientConfiguration("dummy_cache")
{
SqlSchema = "PUBLIC",
CacheMode = CacheMode.Replicated
};
- ICache<object, object> cache = ignite.GetOrCreateCache<object, object>(cacheCfg);
-
+ ICacheClient<object, object> cache = ignite.GetOrCreateCache<object, object>(cacheCfg);
+
// Create reference City table based on REPLICATED template.
cache.Query(new SqlFieldsQuery(
"CREATE TABLE city (id LONG PRIMARY KEY, name VARCHAR) WITH \"template=replicated\"")).GetAll();
@@ -70,24 +63,24 @@ namespace Apache.Ignite.Examples.Sql
// Create an index.
cache.Query(new SqlFieldsQuery("CREATE INDEX on Person (city_id)")).GetAll();
-
+
Console.WriteLine("\n>>> Created database objects.");
const string addCity = "INSERT INTO city (id, name) VALUES (?, ?)";
-
+
cache.Query(new SqlFieldsQuery(addCity, 1L, "Forest Hill"));
cache.Query(new SqlFieldsQuery(addCity, 2L, "Denver"));
cache.Query(new SqlFieldsQuery(addCity, 3L, "St. Petersburg"));
const string addPerson = "INSERT INTO person (id, name, city_id) values (?, ?, ?)";
-
+
cache.Query(new SqlFieldsQuery(addPerson, 1L, "John Doe", 3L));
cache.Query(new SqlFieldsQuery(addPerson, 2L, "Jane Roe", 2L));
cache.Query(new SqlFieldsQuery(addPerson, 3L, "Mary Major", 1L));
cache.Query(new SqlFieldsQuery(addPerson, 4L, "Richard Miles", 2L));
-
+
Console.WriteLine("\n>>> Populated data.");
-
+
IFieldsQueryCursor res = cache.Query(new SqlFieldsQuery(
"SELECT p.name, c.name FROM Person p INNER JOIN City c on c.id = p.city_id"));
@@ -97,16 +90,15 @@ namespace Apache.Ignite.Examples.Sql
{
Console.WriteLine("{0}, {1}", row[0], row[1]);
}
-
+
cache.Query(new SqlFieldsQuery("drop table Person")).GetAll();
cache.Query(new SqlFieldsQuery("drop table City")).GetAll();
- Console.WriteLine("\n>>> Dropped database objects.");
- }
+ Console.WriteLine("\n>>> Dropped database objects."); }
Console.WriteLine();
Console.WriteLine(">>> Example finished, press any key to exit ...");
Console.ReadKey();
}
}
-}
\ No newline at end of file
+}
diff --git a/modules/platforms/dotnet/examples/Thin/Sql/DmlThin/DmlThin.csproj b/modules/platforms/dotnet/examples/Thin/Sql/DmlThin/DmlThin.csproj
new file mode 100644
index 0000000..3b4c66c
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thin/Sql/DmlThin/DmlThin.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thin.Sql.DmlThin</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlDmlExample.cs b/modules/platforms/dotnet/examples/Thin/Sql/DmlThin/Program.cs
similarity index 72%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlDmlExample.cs
rename to modules/platforms/dotnet/examples/Thin/Sql/DmlThin/Program.cs
index 7b84fc34..a472f2d 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlDmlExample.cs
+++ b/modules/platforms/dotnet/examples/Thin/Sql/DmlThin/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,48 +15,41 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Sql
+namespace Apache.Ignite.Examples.Thin.Sql.DmlThin
{
using System;
using Apache.Ignite.Core;
- using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.Core.Cache.Query;
- using Apache.Ignite.ExamplesDll.Binary;
+ using Apache.Ignite.Core.Client.Cache;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Models;
/// <summary>
- /// This example showcases DML capabilities of Ignite's SQL engine.
+ /// This example showcases DML capabilities of the Ignite SQL engine with thin client
/// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config
- /// 2) Start example.
+ /// This example requires an Ignite server node. You can start the node in any of the following ways:
+ /// * docker run -p 10800:10800 apacheignite/ignite
+ /// * dotnet run -p ServerNode.csproj
+ /// * ignite.sh/ignite.bat from the distribution
/// </summary>
- public class SqlDmlExample
+ public static class Program
{
- /// <summary>Organization cache name.</summary>
private const string OrganizationCacheName = "dotnet_cache_query_dml_organization";
- /// <summary>Employee cache name.</summary>
private const string EmployeeCacheName = "dotnet_cache_query_dml_employee";
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (var ignite = Ignition.StartClient(Utils.GetThinClientConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Cache query DML example started.");
var employeeCache = ignite.GetOrCreateCache<int, Employee>(
- new CacheConfiguration(EmployeeCacheName, new QueryEntity(typeof(int), typeof(Employee))));
+ new CacheClientConfiguration(EmployeeCacheName, new QueryEntity(typeof(int), typeof(Employee))));
- var organizationCache = ignite.GetOrCreateCache<int, Organization>(new CacheConfiguration(
+ var organizationCache = ignite.GetOrCreateCache<int, Organization>(new CacheClientConfiguration(
OrganizationCacheName, new QueryEntity(typeof(int), typeof(Organization))));
employeeCache.Clear();
@@ -82,9 +75,7 @@ namespace Apache.Ignite.Examples.Sql
/// <summary>
/// Selects and displays Employee data.
/// </summary>
- /// <param name="employeeCache">Employee cache.</param>
- /// <param name="message">Message.</param>
- private static void Select(ICache<int, Employee> employeeCache, string message)
+ private static void Select(ICacheClient<int, Employee> employeeCache, string message)
{
Console.WriteLine("\n>>> {0}", message);
@@ -107,11 +98,11 @@ namespace Apache.Ignite.Examples.Sql
}
/// <summary>
- /// Populate cache with test data.
+ /// Populates cache with test data.
/// </summary>
- /// <param name="organizationCache">Organization cache.</param>
- /// <param name="employeeCache">Employee cache.</param>
- private static void Insert(ICache<int, Organization> organizationCache, ICache<int, Employee> employeeCache)
+ private static void Insert(
+ ICacheClient<int, Organization> organizationCache,
+ ICacheClient<int, Employee> employeeCache)
{
// Insert organizations.
var qry = new SqlFieldsQuery("insert into Organization (_key, name) values (?, ?)", 1, "ASF");
@@ -140,7 +131,7 @@ namespace Apache.Ignite.Examples.Sql
/// Conditional UPDATE query: raise salary for ASF employees.
/// </summary>
/// <param name="employeeCache">Employee cache.</param>
- private static void Update(ICache<int, Employee> employeeCache)
+ private static void Update(ICacheClient<int, Employee> employeeCache)
{
var qry = new SqlFieldsQuery("update Employee set salary = salary * 1.1 where organizationId = ?", 1);
@@ -151,7 +142,7 @@ namespace Apache.Ignite.Examples.Sql
/// Conditional DELETE query: remove non-ASF employees.
/// </summary>
/// <param name="employeeCache">Employee cache.</param>
- private static void Delete(ICache<int, Employee> employeeCache)
+ private static void Delete(ICacheClient<int, Employee> employeeCache)
{
var qry = new SqlFieldsQuery("delete from Employee where organizationId != ?", 1);
diff --git a/modules/platforms/dotnet/examples/Thin/Sql/LinqThin/LinqThin.csproj b/modules/platforms/dotnet/examples/Thin/Sql/LinqThin/LinqThin.csproj
new file mode 100644
index 0000000..d5417a2
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thin/Sql/LinqThin/LinqThin.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thin.Sql.LinqThin</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/LinqExample.cs b/modules/platforms/dotnet/examples/Thin/Sql/LinqThin/Program.cs
similarity index 71%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/LinqExample.cs
rename to modules/platforms/dotnet/examples/Thin/Sql/LinqThin/Program.cs
index 9a71fca..db2e270 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/LinqExample.cs
+++ b/modules/platforms/dotnet/examples/Thin/Sql/LinqThin/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Sql
+namespace Apache.Ignite.Examples.Thin.Sql.LinqThin
{
using System;
using System.Linq;
@@ -24,50 +24,48 @@ namespace Apache.Ignite.Examples.Sql
using Apache.Ignite.Core.Cache.Affinity;
using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.Core.Cache.Query;
- using Apache.Ignite.ExamplesDll.Binary;
+ using Apache.Ignite.Core.Client.Cache;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Models;
using Apache.Ignite.Linq;
/// <summary>
- /// This example populates cache with sample data and runs several LINQ queries over this data.
+ /// This example demonstrates strongly-typed SQL queries with Ignite LINQ provider in thin client.
/// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config
- /// 2) Start example.
+ /// This example requires an Ignite server node. You can start the node in any of the following ways:
+ /// * docker run -p 10800:10800 apacheignite/ignite
+ /// * dotnet run -p ServerNode.csproj
+ /// * ignite.sh/ignite.bat from the distribution
/// </summary>
- public class LinqExample
+ public static class Program
{
- /// <summary>Organization cache name.</summary>
private const string OrganizationCacheName = "dotnet_cache_query_organization";
- /// <summary>Employee cache name.</summary>
private const string EmployeeCacheName = "dotnet_cache_query_employee";
- /// <summary>Colocated employee cache name.</summary>
private const string EmployeeCacheNameColocated = "dotnet_cache_query_employee_colocated";
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (var ignite = Ignition.StartClient(Utils.GetThinClientConfiguration()))
{
Console.WriteLine();
Console.WriteLine(">>> Cache LINQ example started.");
var employeeCache = ignite.GetOrCreateCache<int, Employee>(
- new CacheConfiguration(EmployeeCacheName, new QueryEntity(typeof(int), typeof(Employee))));
+ new CacheClientConfiguration(
+ EmployeeCacheName,
+ new QueryEntity(typeof(int), typeof(Employee))));
var employeeCacheColocated = ignite.GetOrCreateCache<AffinityKey, Employee>(
- new CacheConfiguration(EmployeeCacheNameColocated,
+ new CacheClientConfiguration(
+ EmployeeCacheNameColocated,
new QueryEntity(typeof(AffinityKey), typeof(Employee))));
var organizationCache = ignite.GetOrCreateCache<int, Organization>(
- new CacheConfiguration(OrganizationCacheName, new QueryEntity(typeof(int), typeof(Organization))));
+ new CacheClientConfiguration(
+ OrganizationCacheName,
+ new QueryEntity(typeof(int), typeof(Organization))));
// Populate cache with sample data entries.
PopulateCache(employeeCache);
@@ -97,11 +95,7 @@ namespace Apache.Ignite.Examples.Sql
Console.ReadKey();
}
- /// <summary>
- /// Queries employees that have provided ZIP code in address.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void QueryExample(ICache<int, Employee> cache)
+ private static void QueryExample(ICacheClient<int, Employee> cache)
{
const int zip = 94109;
@@ -109,17 +103,15 @@ namespace Apache.Ignite.Examples.Sql
cache.AsCacheQueryable().Where(emp => emp.Value.Address.Zip == zip);
Console.WriteLine();
- Console.WriteLine(">>> Employees with zipcode " + zip + ":");
+ Console.WriteLine($">>> Employees with zipcode {zip}:");
foreach (ICacheEntry<int, Employee> entry in qry)
Console.WriteLine(">>> " + entry.Value);
+
+ Console.WriteLine($">>> Generated SQL: {qry.ToCacheQueryable().GetFieldsQuery().Sql}");
}
- /// <summary>
- /// Queries employees that have provided ZIP code in address with a compiled query.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void CompiledQueryExample(ICache<int, Employee> cache)
+ private static void CompiledQueryExample(ICacheClient<int, Employee> cache)
{
const int zip = 94109;
@@ -136,13 +128,9 @@ namespace Apache.Ignite.Examples.Sql
Console.WriteLine(">>> " + entry.Value);
}
- /// <summary>
- /// Queries employees that work for organization with provided name.
- /// </summary>
- /// <param name="employeeCache">Employee cache.</param>
- /// <param name="organizationCache">Organization cache.</param>
- private static void JoinQueryExample(ICache<AffinityKey, Employee> employeeCache,
- ICache<int, Organization> organizationCache)
+ private static void JoinQueryExample(
+ ICacheClient<AffinityKey, Employee> employeeCache,
+ ICacheClient<int, Organization> organizationCache)
{
const string orgName = "Apache";
@@ -157,19 +145,17 @@ namespace Apache.Ignite.Examples.Sql
Console.WriteLine();
- Console.WriteLine(">>> Employees working for " + orgName + ":");
+ Console.WriteLine($">>> Employees working for {orgName}:");
foreach (ICacheEntry<AffinityKey, Employee> entry in qry)
Console.WriteLine(">>> " + entry.Value);
+
+ Console.WriteLine($">>> Generated SQL: {qry.ToCacheQueryable().GetFieldsQuery().Sql}");
}
- /// <summary>
- /// Queries employees that work for organization with provided name.
- /// </summary>
- /// <param name="employeeCache">Employee cache.</param>
- /// <param name="organizationCache">Organization cache.</param>
- private static void DistributedJoinQueryExample(ICache<int, Employee> employeeCache,
- ICache<int, Organization> organizationCache)
+ private static void DistributedJoinQueryExample(
+ ICacheClient<int, Employee> employeeCache,
+ ICacheClient<int, Organization> organizationCache)
{
const string orgName = "Apache";
@@ -190,17 +176,15 @@ namespace Apache.Ignite.Examples.Sql
Console.WriteLine();
- Console.WriteLine(">>> Employees working for " + orgName + ":");
+ Console.WriteLine($">>> Employees working for {orgName} using distributed joins:");
foreach (ICacheEntry<int, Employee> entry in qry)
Console.WriteLine(">>> " + entry.Value);
+
+ Console.WriteLine($">>> Generated SQL: {qry.ToCacheQueryable().GetFieldsQuery().Sql}");
}
- /// <summary>
- /// Queries names and salaries for all employees.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void FieldsQueryExample(ICache<int, Employee> cache)
+ private static void FieldsQueryExample(ICacheClient<int, Employee> cache)
{
var qry = cache.AsCacheQueryable().Select(entry => new {entry.Value.Name, entry.Value.Salary});
@@ -208,14 +192,12 @@ namespace Apache.Ignite.Examples.Sql
Console.WriteLine(">>> Employee names and their salaries:");
foreach (var row in qry)
- Console.WriteLine(">>> [Name=" + row.Name + ", salary=" + row.Salary + ']');
+ Console.WriteLine($">>> [Name={row.Name}, salary={row.Salary}{']'}");
+
+ Console.WriteLine($">>> Generated SQL: {qry.ToCacheQueryable().GetFieldsQuery().Sql}");
}
- /// <summary>
- /// Populate cache with data for this example.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void PopulateCache(ICache<int, Organization> cache)
+ private static void PopulateCache(ICacheClient<int, Organization> cache)
{
cache.Put(1, new Organization(
"Apache",
@@ -230,11 +212,7 @@ namespace Apache.Ignite.Examples.Sql
DateTime.Now));
}
- /// <summary>
- /// Populate cache with data for this example.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void PopulateCache(ICache<AffinityKey, Employee> cache)
+ private static void PopulateCache(ICacheClient<AffinityKey, Employee> cache)
{
cache.Put(new AffinityKey(1, 1), new Employee(
"James Wilson",
@@ -286,11 +264,7 @@ namespace Apache.Ignite.Examples.Sql
2));
}
- /// <summary>
- /// Populate cache with data for this example.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void PopulateCache(ICache<int, Employee> cache)
+ private static void PopulateCache(ICacheClient<int, Employee> cache)
{
cache.Put(1, new Employee(
"James Wilson",
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs b/modules/platforms/dotnet/examples/Thin/Sql/SqlThin/Program.cs
similarity index 74%
rename from modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs
rename to modules/platforms/dotnet/examples/Thin/Sql/SqlThin/Program.cs
index 20de310..f33c220 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs
+++ b/modules/platforms/dotnet/examples/Thin/Sql/SqlThin/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
@@ -15,57 +15,49 @@
* limitations under the License.
*/
-namespace Apache.Ignite.Examples.Sql
+namespace Apache.Ignite.Examples.Thin.Sql.SqlThin
{
using System;
using Apache.Ignite.Core;
- using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cache.Affinity;
using Apache.Ignite.Core.Cache.Configuration;
using Apache.Ignite.Core.Cache.Query;
- using Apache.Ignite.ExamplesDll.Binary;
+ using Apache.Ignite.Core.Client.Cache;
+ using Apache.Ignite.Examples.Shared;
+ using Apache.Ignite.Examples.Shared.Models;
/// <summary>
- /// This example populates cache with sample data and runs SQL queries.
+ /// This example demonstrates SQL queries with thin client.
/// <para />
- /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
- /// 2) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
- /// Application -> Startup object);
- /// 3) Start example (F5 or Ctrl+F5).
- /// <para />
- /// This example can be run with standalone Apache Ignite.NET node:
- /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
- /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config
- /// 2) Start example.
+ /// This example requires an Ignite server node. You can start the node in any of the following ways:
+ /// * docker run -p 10800:10800 apacheignite/ignite
+ /// * dotnet run -p ServerNode.csproj
+ /// * ignite.sh/ignite.bat from the distribution
/// </summary>
- public class SqlExample
+ public static class Program
{
- /// <summary>Organization cache name.</summary>
private const string OrganizationCacheName = "dotnet_cache_query_organization";
- /// <summary>Employee cache name.</summary>
private const string EmployeeCacheName = "dotnet_cache_query_employee";
- /// <summary>Employee cache name.</summary>
private const string EmployeeCacheNameColocated = "dotnet_cache_query_employee_colocated";
- [STAThread]
public static void Main()
{
- using (var ignite = Ignition.StartFromApplicationConfiguration())
+ using (var ignite = Ignition.StartClient(Utils.GetThinClientConfiguration()))
{
Console.WriteLine();
- Console.WriteLine(">>> Cache query example started.");
+ Console.WriteLine(">>> Cache SQL example started.");
var employeeCache = ignite.GetOrCreateCache<int, Employee>(
- new CacheConfiguration(EmployeeCacheName, new QueryEntity(typeof(int), typeof(Employee))));
+ new CacheClientConfiguration(EmployeeCacheName, new QueryEntity(typeof(int), typeof(Employee))));
var employeeCacheColocated = ignite.GetOrCreateCache<AffinityKey, Employee>(
- new CacheConfiguration(EmployeeCacheNameColocated,
+ new CacheClientConfiguration(EmployeeCacheNameColocated,
new QueryEntity(typeof(AffinityKey), typeof(Employee))));
var organizationCache = ignite.GetOrCreateCache<int, Organization>(
- new CacheConfiguration(OrganizationCacheName, new QueryEntity(typeof(int), typeof(Organization))));
+ new CacheClientConfiguration(OrganizationCacheName, new QueryEntity(typeof(int), typeof(Organization))));
// Populate cache with sample data entries.
PopulateCache(employeeCache);
@@ -89,11 +81,7 @@ namespace Apache.Ignite.Examples.Sql
Console.ReadKey();
}
- /// <summary>
- /// Queries employees that have provided ZIP code in address.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void SqlQueryExample(ICache<int, Employee> cache)
+ private static void SqlQueryExample(ICacheClient<int, Employee> cache)
{
const int zip = 94109;
@@ -106,11 +94,7 @@ namespace Apache.Ignite.Examples.Sql
Console.WriteLine(">>> [Name=" + row[0] + ", salary=" + row[1] + ']');
}
- /// <summary>
- /// Queries employees that work for organization with provided name.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void SqlJoinQueryExample(ICache<AffinityKey, Employee> cache)
+ private static void SqlJoinQueryExample(ICacheClient<AffinityKey, Employee> cache)
{
const string orgName = "Apache";
@@ -125,11 +109,7 @@ namespace Apache.Ignite.Examples.Sql
Console.WriteLine(">>> " + entry[0]);
}
- /// <summary>
- /// Queries employees that work for organization with provided name.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void SqlDistributedJoinQueryExample(ICache<int, Employee> cache)
+ private static void SqlDistributedJoinQueryExample(ICacheClient<int, Employee> cache)
{
const string orgName = "Apache";
@@ -148,11 +128,7 @@ namespace Apache.Ignite.Examples.Sql
Console.WriteLine(">>> " + entry[0]);
}
- /// <summary>
- /// Populate cache with data for this example.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void PopulateCache(ICache<int, Organization> cache)
+ private static void PopulateCache(ICacheClient<int, Organization> cache)
{
cache.Put(1, new Organization(
"Apache",
@@ -166,11 +142,7 @@ namespace Apache.Ignite.Examples.Sql
DateTime.Now));
}
- /// <summary>
- /// Populate cache with data for this example.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void PopulateCache(ICache<AffinityKey, Employee> cache)
+ private static void PopulateCache(ICacheClient<AffinityKey, Employee> cache)
{
cache.Put(new AffinityKey(1, 1), new Employee(
"James Wilson",
@@ -222,11 +194,7 @@ namespace Apache.Ignite.Examples.Sql
2));
}
- /// <summary>
- /// Populate cache with data for this example.
- /// </summary>
- /// <param name="cache">Cache.</param>
- private static void PopulateCache(ICache<int, Employee> cache)
+ private static void PopulateCache(ICacheClient<int, Employee> cache)
{
cache.Put(1, new Employee(
"James Wilson",
diff --git a/modules/platforms/dotnet/examples/Thin/Sql/SqlThin/SqlThin.csproj b/modules/platforms/dotnet/examples/Thin/Sql/SqlThin/SqlThin.csproj
new file mode 100644
index 0000000..21bccbe
--- /dev/null
+++ b/modules/platforms/dotnet/examples/Thin/Sql/SqlThin/SqlThin.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>Apache.Ignite.Examples.Thin.Sql.SqlThin</RootNamespace>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Shared\Shared.csproj"/>
+ </ItemGroup>
+
+</Project>
diff --git a/modules/platforms/dotnet/examples/dotnetcore/Apache.Ignite.Examples.csproj b/modules/platforms/dotnet/examples/dotnetcore/Apache.Ignite.Examples.csproj
deleted file mode 100644
index 9deb9fa..0000000
--- a/modules/platforms/dotnet/examples/dotnetcore/Apache.Ignite.Examples.csproj
+++ /dev/null
@@ -1,29 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <TargetFramework>netcoreapp2.0</TargetFramework>
- <StartupObject>Apache.Ignite.Examples.Program</StartupObject>
- </PropertyGroup>
-
- <PropertyGroup>
- <NoWarn>NU1701</NoWarn>
- </PropertyGroup>
-
- <ItemGroup>
- <Reference Include="Apache.Ignite.Core">
- <HintPath Condition="Exists('..\..\Apache.Ignite')">..\..\Apache.Ignite\bin\$(Configuration)\Apache.Ignite.Core.dll</HintPath>
- <HintPath Condition="Exists('..\..\bin\Apache.Ignite.Core.dll')">..\..\bin\Apache.Ignite.Core.dll</HintPath>
- </Reference>
- <Reference Include="Apache.Ignite.Linq">
- <HintPath Condition="Exists('..\..\Apache.Ignite.Linq')">..\..\Apache.Ignite.Linq\bin\$(Configuration)\Apache.Ignite.Linq.dll</HintPath>
- <HintPath Condition="Exists('..\..\bin\Apache.Ignite.Linq.dll')">..\..\bin\Apache.Ignite.Linq.dll</HintPath>
- </Reference>
- </ItemGroup>
-
- <ItemGroup>
- <PackageReference Include="System.Configuration.ConfigurationManager" Version="4.4.0" />
- <PackageReference Include="Remotion.Linq" Version="2.0.1" />
- </ItemGroup>
-
-</Project>
diff --git a/modules/platforms/dotnet/examples/dotnetcore/App.config b/modules/platforms/dotnet/examples/dotnetcore/App.config
deleted file mode 100644
index 32c8b31..0000000
--- a/modules/platforms/dotnet/examples/dotnetcore/App.config
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-
-<!--
- 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
... 1133 lines suppressed ...