Example #1
0
        public static StartRuleResponse Unmarshall(UnmarshallerContext context)
        {
            StartRuleResponse startRuleResponse = new StartRuleResponse();

            startRuleResponse.HttpResponse = context.HttpResponse;
            startRuleResponse.RequestId    = context.StringValue("StartRule.RequestId");
            startRuleResponse.Success      = context.BooleanValue("StartRule.Success");
            startRuleResponse.Code         = context.StringValue("StartRule.Code");
            startRuleResponse.ErrorMessage = context.StringValue("StartRule.ErrorMessage");

            return(startRuleResponse);
        }
Example #2
0
        //启动规则之前,确保设置了正确的Topic过滤条件,以及转发目的地
        public void TestStartRule()
        {
            DefaultAcsClient acsClient    = Demo.IotClient.GetClient();
            long             ruleActionId = 321103;

            StartRuleRequest request = new StartRuleRequest();

            request.RuleId = ruleActionId;

            StartRuleResponse response = acsClient.GetAcsResponse(request);

            Console.WriteLine("Start Rule Action: " + response.Success);
            if (!(bool)response.Success)
            {
                Console.WriteLine(response.Code + ", " + response.ErrorMessage);
                Console.ReadKey();
                return;
            }
        }