Beispiel #1
0
        /// <summary>
        /// TBD
        /// </summary>
        /// <param name="cause">TBD</param>
        /// <param name="message">TBD</param>
        public override void AroundPostRestart(Exception cause, object message)
        {
            var s = _state.Remove(Self);
            if (s != null)
            {
                _subscriber = UntypedSubscriber.ToTyped<T>(s.Subscriber);
                _demand = s.Demand;
                _lifecycleState = s.LifecycleState;
            }

            base.AroundPostRestart(cause, message);
        }
Beispiel #2
0
        internal static IActorSubscription Create(IActorRef implementor, IUntypedSubscriber subscriber)
        {
            var subscribedType   = subscriber.GetType().GetGenericArguments().First(); // assumes type is UntypedSubscriberWrapper
            var subscriptionType = typeof(ActorSubscription <>).MakeGenericType(subscribedType);

            return((IActorSubscription)Activator.CreateInstance(subscriptionType, implementor, UntypedSubscriber.ToTyped(subscriber)));
        }
Beispiel #3
0
 private void SubscribePending()
 =>
 ExposedPublisher.TakePendingSubscribers()
 .ForEach(s => RegisterSubscriber(UntypedSubscriber.ToTyped <T>(s)));