protected override bool Receive(object message)
{
message.Match().With<string>(x =>
{
if (x == Knob)
{
var kid = Context.ActorOf(Props.Create(() => new KnobKidActor()), "kid");
Context.Watch(kid);
kid.Forward(Knob);
Context.Become(msg =>
{
msg.Match().With<Terminated>(y =>
{
if (y.ActorRef == kid)
{
_testActor.Tell(Bonk);
Context.UnbecomeStacked();
}
});
return true;
});
}
});
return true;
}
}