public Observer(ActorPath path2, ActorPath path3, TestLatch watchEstablished, IActorRef testActorRef)
{
_watchEstablished = watchEstablished;
_testActorRef = testActorRef;
Receive<ActorIdentity>(identity => identity.MessageId.Equals(path2), identity =>
{
Context.Watch(identity.Subject);
_watchEstablished.CountDown();
});
Receive<ActorIdentity>(identity => identity.MessageId.Equals(path3), identity =>
{
Context.Watch(identity.Subject);
_watchEstablished.CountDown();
});
Receive<Terminated>(terminated =>
{
_testActorRef.Tell(terminated.ActorRef.Path);
});
Context.ActorSelection(path2).Tell(new Identify(path2));
Context.ActorSelection(path3).Tell(new Identify(path3));
}
}