public void AddNotificationListener(ObjectName name, NotificationCallback callback, NotificationFilterCallback filterCallback, object handback)
 {
     var key = new NotificationSubscriptionKey(name, callback, filterCallback, handback);
     if (_subscriptions.ContainsKey(key))
     {
         throw new InvalidOperationException("Subscription already exists.");
     }
     var pullDeliverySubscription = _eventingClient.SubscribeUsingPullDelivery<TargetedNotificationType>(new Filter(Schema.NotificationDialect, null), new Mandatory(name.CreateSelectorSetHeader()));
     var listener = new PullSubscriptionListener(pullDeliverySubscription, callback, filterCallback, handback);
     _subscriptions.Add(key, listener);
 }
        public void AddNotificationListener(ObjectName name, NotificationCallback callback, NotificationFilterCallback filterCallback, object handback)
        {
            var key = new NotificationSubscriptionKey(name, callback, filterCallback, handback);

            if (_subscriptions.ContainsKey(key))
            {
                throw new InvalidOperationException("Subscription already exists.");
            }
            var pullDeliverySubscription = _eventingClient.SubscribeUsingPullDelivery <TargetedNotificationType>(new Filter(Schema.NotificationDialect, null), new Mandatory(name.CreateSelectorSetHeader()));
            var listener = new PullSubscriptionListener(pullDeliverySubscription, callback, filterCallback, handback);

            _subscriptions.Add(key, listener);
        }