コード例 #1
0
        public SubscriptionInstance AddSubscription(string key, string subscriberName, Func <IBrokerContext, Task> callback, Func <IBrokerContext> factory = null)
        {
            IBrokerSubscription subscription = _brokers.CreateSubscription(subscriberName, callback, factory);
            var sub = new SubscriptionInstance(key, subscription);

            _items.Add(sub);
            return(sub);
        }
コード例 #2
0
 public SubscriptionInstance AddSubscription(SubscriptionInstance subscription)
 {
     _items.Add(subscription);
     return(subscription);
 }