public DumbObserver ( ActorPath path2, IActorRef testActorRef ) : System | ||
path2 | ActorPath | |
testActorRef | IActorRef | |
return | System |
public DumbObserver(ActorPath path2, IActorRef testActorRef)
{
_testActorRef = testActorRef;
Receive<ActorIdentity>(identity =>
{
Context.Watch(identity.Subject);
});
Receive<Terminated>(terminated =>
{
_testActorRef.Tell(terminated.ActorRef.Path);
});
Context.ActorSelection(path2).Tell(new Identify(path2));
}
}