Created
December 6, 2020 13:58
-
-
Save ptupitsyn/a334dc85116ca537e276a752cffb00dd to your computer and use it in GitHub Desktop.
Apache Ignite PeerAssemblyLoading demo - Client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>net5.0</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Apache.Ignite" Version="2.9.0" /> | |
</ItemGroup> | |
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Apache.Ignite.Core; | |
using Apache.Ignite.Core.Compute; | |
using Apache.Ignite.Core.Deployment; | |
namespace client | |
{ | |
class HelloAction : IComputeAction | |
{ | |
public void Invoke() | |
{ | |
Console.WriteLine("Hello, World!"); | |
} | |
} | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var cfg = new IgniteConfiguration | |
{ | |
PeerAssemblyLoadingMode = PeerAssemblyLoadingMode.CurrentAppDomain | |
}; | |
using (var ignite = Ignition.Start(cfg)) | |
{ | |
ignite.GetCompute().Broadcast(new HelloAction()); | |
} | |
} | |
}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment