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

            describeEslDevicesResponse.HttpResponse   = context.HttpResponse;
            describeEslDevicesResponse.ErrorMessage   = context.StringValue("DescribeEslDevices.ErrorMessage");
            describeEslDevicesResponse.ErrorCode      = context.StringValue("DescribeEslDevices.ErrorCode");
            describeEslDevicesResponse.PageSize       = context.IntegerValue("DescribeEslDevices.PageSize");
            describeEslDevicesResponse.Message        = context.StringValue("DescribeEslDevices.Message");
            describeEslDevicesResponse.TotalCount     = context.IntegerValue("DescribeEslDevices.TotalCount");
            describeEslDevicesResponse.DynamicCode    = context.StringValue("DescribeEslDevices.DynamicCode");
            describeEslDevicesResponse.Code           = context.StringValue("DescribeEslDevices.Code");
            describeEslDevicesResponse.PageNumber     = context.IntegerValue("DescribeEslDevices.PageNumber");
            describeEslDevicesResponse.DynamicMessage = context.StringValue("DescribeEslDevices.DynamicMessage");
            describeEslDevicesResponse.RequestId      = context.StringValue("DescribeEslDevices.RequestId");
            describeEslDevicesResponse.Success        = context.BooleanValue("DescribeEslDevices.Success");

            List <DescribeEslDevicesResponse.DescribeEslDevices_EslDeviceInfo> describeEslDevicesResponse_eslDevices = new List <DescribeEslDevicesResponse.DescribeEslDevices_EslDeviceInfo>();

            for (int i = 0; i < context.Length("DescribeEslDevices.EslDevices.Length"); i++)
            {
                DescribeEslDevicesResponse.DescribeEslDevices_EslDeviceInfo eslDeviceInfo = new DescribeEslDevicesResponse.DescribeEslDevices_EslDeviceInfo();
                eslDeviceInfo.BeBind              = context.BooleanValue("DescribeEslDevices.EslDevices[" + i + "].BeBind");
                eslDeviceInfo.PositionCode        = context.StringValue("DescribeEslDevices.EslDevices[" + i + "].PositionCode");
                eslDeviceInfo.EslStatus           = context.StringValue("DescribeEslDevices.EslDevices[" + i + "].EslStatus");
                eslDeviceInfo.StoreId             = context.StringValue("DescribeEslDevices.EslDevices[" + i + "].StoreId");
                eslDeviceInfo.Type                = context.StringValue("DescribeEslDevices.EslDevices[" + i + "].Type");
                eslDeviceInfo.Mac                 = context.StringValue("DescribeEslDevices.EslDevices[" + i + "].Mac");
                eslDeviceInfo.ItemActionPrice     = context.IntegerValue("DescribeEslDevices.EslDevices[" + i + "].ItemActionPrice");
                eslDeviceInfo.ConnectAp           = context.StringValue("DescribeEslDevices.EslDevices[" + i + "].ConnectAp");
                eslDeviceInfo.ItemPriceUnit       = context.StringValue("DescribeEslDevices.EslDevices[" + i + "].ItemPriceUnit");
                eslDeviceInfo.ShelfCode           = context.StringValue("DescribeEslDevices.EslDevices[" + i + "].ShelfCode");
                eslDeviceInfo.ScreenWidth         = context.IntegerValue("DescribeEslDevices.EslDevices[" + i + "].ScreenWidth");
                eslDeviceInfo.ItemTitle           = context.StringValue("DescribeEslDevices.EslDevices[" + i + "].ItemTitle");
                eslDeviceInfo.ScreenHeight        = context.IntegerValue("DescribeEslDevices.EslDevices[" + i + "].ScreenHeight");
                eslDeviceInfo.LastCommunicateTime = context.StringValue("DescribeEslDevices.EslDevices[" + i + "].LastCommunicateTime");
                eslDeviceInfo.Model               = context.StringValue("DescribeEslDevices.EslDevices[" + i + "].Model");
                eslDeviceInfo.EslBarCode          = context.StringValue("DescribeEslDevices.EslDevices[" + i + "].EslBarCode");
                eslDeviceInfo.BatteryLevel        = context.IntegerValue("DescribeEslDevices.EslDevices[" + i + "].BatteryLevel");
                eslDeviceInfo.ItemBarCode         = context.StringValue("DescribeEslDevices.EslDevices[" + i + "].ItemBarCode");
                eslDeviceInfo.ItemId              = context.LongValue("DescribeEslDevices.EslDevices[" + i + "].ItemId");
                eslDeviceInfo.CompanyId           = context.StringValue("DescribeEslDevices.EslDevices[" + i + "].CompanyId");
                eslDeviceInfo.Vendor              = context.StringValue("DescribeEslDevices.EslDevices[" + i + "].Vendor");

                describeEslDevicesResponse_eslDevices.Add(eslDeviceInfo);
            }
            describeEslDevicesResponse.EslDevices = describeEslDevicesResponse_eslDevices;

            return(describeEslDevicesResponse);
        }
        public static DescribeEslDevicesResponse Unmarshall(UnmarshallerContext _ctx)
        {
            DescribeEslDevicesResponse describeEslDevicesResponse = new DescribeEslDevicesResponse();

            describeEslDevicesResponse.HttpResponse   = _ctx.HttpResponse;
            describeEslDevicesResponse.ErrorMessage   = _ctx.StringValue("DescribeEslDevices.ErrorMessage");
            describeEslDevicesResponse.ErrorCode      = _ctx.StringValue("DescribeEslDevices.ErrorCode");
            describeEslDevicesResponse.PageSize       = _ctx.IntegerValue("DescribeEslDevices.PageSize");
            describeEslDevicesResponse.Message        = _ctx.StringValue("DescribeEslDevices.Message");
            describeEslDevicesResponse.TotalCount     = _ctx.IntegerValue("DescribeEslDevices.TotalCount");
            describeEslDevicesResponse.DynamicCode    = _ctx.StringValue("DescribeEslDevices.DynamicCode");
            describeEslDevicesResponse.Code           = _ctx.StringValue("DescribeEslDevices.Code");
            describeEslDevicesResponse.PageNumber     = _ctx.IntegerValue("DescribeEslDevices.PageNumber");
            describeEslDevicesResponse.DynamicMessage = _ctx.StringValue("DescribeEslDevices.DynamicMessage");
            describeEslDevicesResponse.RequestId      = _ctx.StringValue("DescribeEslDevices.RequestId");
            describeEslDevicesResponse.Success        = _ctx.BooleanValue("DescribeEslDevices.Success");

            List <DescribeEslDevicesResponse.DescribeEslDevices_EslDeviceInfo> describeEslDevicesResponse_eslDevices = new List <DescribeEslDevicesResponse.DescribeEslDevices_EslDeviceInfo>();

            for (int i = 0; i < _ctx.Length("DescribeEslDevices.EslDevices.Length"); i++)
            {
                DescribeEslDevicesResponse.DescribeEslDevices_EslDeviceInfo eslDeviceInfo = new DescribeEslDevicesResponse.DescribeEslDevices_EslDeviceInfo();
                eslDeviceInfo.LastCommunicateTime = _ctx.StringValue("DescribeEslDevices.EslDevices[" + i + "].LastCommunicateTime");
                eslDeviceInfo.Model        = _ctx.StringValue("DescribeEslDevices.EslDevices[" + i + "].Model");
                eslDeviceInfo.EslStatus    = _ctx.StringValue("DescribeEslDevices.EslDevices[" + i + "].EslStatus");
                eslDeviceInfo.StoreId      = _ctx.StringValue("DescribeEslDevices.EslDevices[" + i + "].StoreId");
                eslDeviceInfo.EslBarCode   = _ctx.StringValue("DescribeEslDevices.EslDevices[" + i + "].EslBarCode");
                eslDeviceInfo.Type         = _ctx.StringValue("DescribeEslDevices.EslDevices[" + i + "].Type");
                eslDeviceInfo.Mac          = _ctx.StringValue("DescribeEslDevices.EslDevices[" + i + "].Mac");
                eslDeviceInfo.BatteryLevel = _ctx.IntegerValue("DescribeEslDevices.EslDevices[" + i + "].BatteryLevel");
                eslDeviceInfo.ScreenWidth  = _ctx.IntegerValue("DescribeEslDevices.EslDevices[" + i + "].ScreenWidth");
                eslDeviceInfo.ScreenHeight = _ctx.IntegerValue("DescribeEslDevices.EslDevices[" + i + "].ScreenHeight");

                describeEslDevicesResponse_eslDevices.Add(eslDeviceInfo);
            }
            describeEslDevicesResponse.EslDevices = describeEslDevicesResponse_eslDevices;

            return(describeEslDevicesResponse);
        }