コード例 #1
0
 private void GreetingMessageHandler(GreetingMessage greeting)
 {
     Console.WriteLine($"Typed Actor named: {Self.Path.Name}");
     Console.WriteLine($"Received a greeting: {greeting.Greeting}");
     Console.WriteLine($"Actor's path: {Self.Path}");
     Console.WriteLine($"Actor is part of the ActorSystem: {Context.System.Name}");
 }
コード例 #2
0
        private void GreetingMessageHandler(GreetingMessage greeting)
        {
            IActorRef typedActor = Context.ActorOf <MyTypedActor>("typed-actor-name");

            typedActor.Tell(greeting);
        }