Ejemplo n.º 1
0
        public async Task Setup()
        {
            _timeout       = TimeSpan.FromMinutes(1);
            _system        = ActorSystem.Create("system");
            _parentActor   = _system.ActorOf(Props.Create(() => new ActorWithChild()), "parent");
            _localActorRef = (LocalActorRef)await _parentActor.Ask <IActorRef>(_createMessage, _timeout);

            _cell = _parentActor.As <ActorRefWithCell>().Underlying.As <ActorCell>();
            _repointableActorRef = (RepointableActorRef)_parentActor;

            var exp = _system.As <ExtendedActorSystem>();

            var vPath = exp.Guardian.Path / "testTemp";

            _virtualPathContainer =
                new VirtualPathContainer(exp.Provider, vPath, exp.Guardian, exp.Log);

            _virtualPathContainer.AddChild("foo",
                                           new EmptyLocalActorRef(exp.Provider, vPath / "foo", exp.EventStream));
        }