Exemplo n.º 1
0
        public static RemoveThingTopoResponse Unmarshall(UnmarshallerContext context)
        {
            RemoveThingTopoResponse removeThingTopoResponse = new RemoveThingTopoResponse();

            removeThingTopoResponse.HttpResponse = context.HttpResponse;
            removeThingTopoResponse.RequestId    = context.StringValue("RemoveThingTopo.RequestId");
            removeThingTopoResponse.Success      = context.BooleanValue("RemoveThingTopo.Success");
            removeThingTopoResponse.ErrorMessage = context.StringValue("RemoveThingTopo.ErrorMessage");
            removeThingTopoResponse.Data         = context.BooleanValue("RemoveThingTopo.Data");

            return(removeThingTopoResponse);
        }
Exemplo n.º 2
0
        //解除设备与所属网关设备的拓扑关系
        public void TestRemoveThingTopo()
        {
            DefaultAcsClient acsClient = Demo.IotClient.GetClient();

            String ProductKey = "<productKey>";
            String Devicename = "device_0821_148";

            RemoveThingTopoRequest request = new RemoveThingTopoRequest();

            request.ProductKey = ProductKey;
            request.DeviceName = Devicename;

            RemoveThingTopoResponse response = acsClient.GetAcsResponse(request);

            Console.WriteLine("Remove ThingTopo: " + response.Success);
            if (!(bool)response.Success)
            {
                Console.WriteLine(response.Code + ", " + response.ErrorMessage);
            }

            bool remove = (bool)response.Data;

            Console.WriteLine("Remove ThingTopo Result: " + remove);
        }