Created
August 16, 2015 22:34
-
-
Save renevo/b78ae3426f7a7c038d8a to your computer and use it in GitHub Desktop.
Simple akka.net
This file contains hidden or 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
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