Skip to content

Instantly share code, notes, and snippets.

@renevo
Created August 16, 2015 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renevo/b78ae3426f7a7c038d8a to your computer and use it in GitHub Desktop.
Save renevo/b78ae3426f7a7c038d8a to your computer and use it in GitHub Desktop.
Simple akka.net
public class Program
{
public static void Main(string[] args)
{
using (var system = ActorSystem.Create("MyAkka"))
{
IActorRef tester = system.ActorOf<TestActor>("Test");
tester.Tell("Hello");
Console.ReadLine();
system.Shutdown();
system.AwaitTermination();
Console.ReadLine();
}
}
}
public class TestActor : TypedActor, IHandle<string>
{
public void Handle(string message)
{
Console.WriteLine("Received: {0}", message);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment