Пример #1
0
 public MyRequest(MyRequestType type, MySubscription subscription)
 {
     this.Type = type;
     this.Subscription = subscription;
 }
 public int Subscribe(IMySubscriber subscriber)
 {
     var subscription = new MySubscription(subscriber);
     this._subscriptionManager.AddSubscription(subscription);
     return subscription.QueryID;
 }
        public void AddSubscription(MySubscription subscription)
        {
            this._subscriptions.Add(subscription.QueryID, subscription);

            if (this._pendingRequests != null)
            {
                this._pendingRequests.Add(new MyRequest(MyRequestType.Subscribe, subscription));
            }
        }