public InputSubscriptionRequest BuildSubReq(InputSubReq sr)
        {
            var subReq = new InputSubscriptionRequest
            {
                DeviceDescriptor       = sr.DeviceDescriptor,
                BindingDescriptor      = sr.BindingDescriptor,
                SubscriptionDescriptor = sr.SubscriptionDescriptor,
                Callback = new Action <int>(value =>
                {
                    CallbackResults.Add(sr.Name, new CallbackResult {
                        BindingDescriptor = sr.BindingDescriptor, Value = value
                    });
                })
            };

            return(subReq);
        }
Example #2
0
 private void CallbackHandler(InputSubscriptionRequest sr, short value)
 {
     CallbackResults.Add(sr.SubscriptionDescriptor.SubscriberGuid, new CallbackResult {
         SubReq = sr, Value = value
     });
 }