Ejemplo 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);
        }
Ejemplo n.º 2
0
 internal SubscriptionToken(Trigger <T> output, PriorityAction <T> priorityAction)
 {
     this.output         = output;
     this.priorityAction = priorityAction;
 }