Exemplo n.º 1
0
        public override SubscriptionToken <T> Subscribe(Action <T> onFire, SubscriptionPriority priority, Action onCancel)
        {
            var priorityAction = new PriorityAction <T>(onFire, priority, onCancel);

            addedSubscriptions.Enqueue(priorityAction);
            var token = new SubscriptionToken <T>(this, priorityAction);

            return(token);
        }
Exemplo n.º 2
0
 internal SubscriptionToken(Trigger <T> output, PriorityAction <T> priorityAction)
 {
     this.output         = output;
     this.priorityAction = priorityAction;
 }