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); }
public SubscriptionInstance AddSubscription(SubscriptionInstance subscription) { _items.Add(subscription); return(subscription); }