示例#1
0
        public Task <MsgGetSensorSubscriptionsResponse> GetSensorProviderSubscriptionsAsync(MsgGetSensorSubscriptions getSubscriptionsRequest, bool bypassCapabilityCheck)
        {
            if (!bypassCapabilityCheck && !this.Capabilities.Contains(eThingCaps.SensorProvider))
            {
                return(TheCommonUtils.TaskFromResult(new MsgGetSensorSubscriptionsResponse {
                    Error = "Thing is not a sensor provider"
                }));
            }
            ;
            var getSubscriptionResponseTask = TheCommRequestResponse.PublishRequestJSonAsync <MsgGetSensorSubscriptions, MsgGetSensorSubscriptionsResponse>(this, getSubscriptionsRequest);

            return(getSubscriptionResponseTask);
        }
示例#2
0
 public Task <MsgGetSensorSubscriptionsResponse> GetSensorProviderSubscriptionsAsync(MsgGetSensorSubscriptions getSubscriptionsRequest)
 {
     return(GetSensorProviderSubscriptionsAsync(getSubscriptionsRequest, false));
 }