Akka.Streams.Tests.Actor.ImmediatelyCancelledSubscriber.Props C# (CSharp) Метод

Props() публичный статический Метод

public static Props ( IActorRef probe ) : Props
probe IActorRef
Результат Props
        public new static Props Props(IActorRef probe)
            => Akka.Actor.Props.Create(() => new ImmediatelyCancelledSubscriber(probe)).WithDispatcher("akka.test.stream-dispatcher");

Usage Example

Пример #1
0
        public void ActorSubscriberSpec_should_cancel_incoming_subscription_when_cancel_was_called_before_it_arrived()
        {
            var actorRef = Sys.ActorOf(ImmediatelyCancelledSubscriber.Props(TestActor));
            var sub      = new ActorSubscriberImpl <object>(actorRef);

            Watch(actorRef);
            ExpectNoMsg(200);
            sub.OnSubscribe(new CancelSubscription(TestActor));
            ExpectMsg("cancel");
            ExpectTerminated(actorRef, TimeSpan.FromMilliseconds(200));
        }