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/02/04 18:55:09 UTC

[ignite] 02/02: wip .NET thin client services

This is an automated email from the ASF dual-hosted git repository.

ptupitsyn pushed a commit to branch ignite-14129
in repository https://gitbox.apache.org/repos/asf/ignite.git

commit 502a06c450ec3ec1eb04d8ce156b10b88cb8beeb
Author: Pavel Tupitsyn <pt...@apache.org>
AuthorDate: Thu Feb 4 21:54:29 2021 +0300

    wip .NET thin client services
---
 docs/_docs/code-snippets/dotnet/ThinClient.cs | 19 +++++++++++++++++++
 docs/_docs/code-snippets/dotnet/dotnet.csproj |  2 +-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/docs/_docs/code-snippets/dotnet/ThinClient.cs b/docs/_docs/code-snippets/dotnet/ThinClient.cs
index 629326b..8001431 100644
--- a/docs/_docs/code-snippets/dotnet/ThinClient.cs
+++ b/docs/_docs/code-snippets/dotnet/ThinClient.cs
@@ -25,8 +25,10 @@ using Apache.Ignite.Core.Cache.Query;
 using Apache.Ignite.Core.Client;
 using Apache.Ignite.Core.Client.Cache;
 using Apache.Ignite.Core.Client.Compute;
+using Apache.Ignite.Core.Client.Services;
 using Apache.Ignite.Core.Configuration;
 using Apache.Ignite.Core.Log;
+using Apache.Ignite.Core.Services;
 
 namespace dotnet_helloworld
 {
@@ -347,5 +349,22 @@ namespace dotnet_helloworld
             int result = compute.ExecuteJavaTask<int>("org.foo.bar.AddOneTask", 1);
             //end::client-compute-task[]
         }
+
+        public static void Services()
+        {
+            var cfg = new IgniteClientConfiguration();
+            //tag::client-services[]
+            IIgniteClient client = Ignition.StartClient(cfg);
+            IServicesClient services = client.GetServices();
+            IMyService serviceProxy = services.GetServiceProxy<IMyService>("MyService");
+            serviceProxy.MyServiceMethod("hello");
+            //end::client-services[]
+
+        }
+
+        private interface IMyService
+        {
+            void MyServiceMethod(string val);
+        }
     }
 }
diff --git a/docs/_docs/code-snippets/dotnet/dotnet.csproj b/docs/_docs/code-snippets/dotnet/dotnet.csproj
index 14f8fa3..8cbddee 100644
--- a/docs/_docs/code-snippets/dotnet/dotnet.csproj
+++ b/docs/_docs/code-snippets/dotnet/dotnet.csproj
@@ -5,7 +5,7 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Apache.Ignite" Version="2.9.0-alpha20201001" />
+    <PackageReference Include="Apache.Ignite" Version="2.11.0-alpha20210120" />
   </ItemGroup>
 
 </Project>