protected virtual void OnSubscriptionDataReceived(SubscriptionDataEventArgs e)
        {
            var handler = SubscriptionDataReceived;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Exemplo n.º 2
0
        void behaviour_SubscriptionDataReceived(object sender, SubscriptionDataEventArgs e)
        {
            var subscription = Subscriptions[e.Id];
            var fieldData    = new Dictionary <string, object>();

            foreach (var fieldName in SubscriptionFields[e.Id])
            {
                if (e.Fields.ContainsKey(fieldName))
                {
                    fieldData.Add(fieldName, e.Fields[fieldName]);
                }
            }
            OnSubscriptionChanged(new SubscriptionChangedEventArgs(e.Id, e.Topic, fieldData));
        }
Exemplo n.º 3
0
        void behaviour_SubscriptionDataReceived(object sender, SubscriptionDataEventArgs e)
        {
            var subscription = Subscriptions[e.Id];
            var fieldData = new Dictionary<string, object>();

            foreach (var fieldName in SubscriptionFields[e.Id])
            {
                if(e.Fields.ContainsKey(fieldName))
                    fieldData.Add(fieldName, e.Fields[fieldName]);
            }
            OnSubscriptionChanged(new SubscriptionChangedEventArgs(e.Id, e.Topic, fieldData));
        }
 protected virtual void OnSubscriptionDataReceived(SubscriptionDataEventArgs e)
 {
     var handler = SubscriptionDataReceived;
     if (handler != null) handler(this, e);
 }