Aliyun.Acs.Slb.Transform.V20140515.DescribeVServerGroupAttributeResponseUnmarshaller.Unmarshall C# (CSharp) Method

Unmarshall() public static method

public static Unmarshall ( UnmarshallerContext context ) : DescribeVServerGroupAttributeResponse
context UnmarshallerContext
return DescribeVServerGroupAttributeResponse
        public static DescribeVServerGroupAttributeResponse Unmarshall(UnmarshallerContext context)
        {
            DescribeVServerGroupAttributeResponse describeVServerGroupAttributeResponse = new DescribeVServerGroupAttributeResponse();

            describeVServerGroupAttributeResponse.HttpResponse = context.HttpResponse;
            describeVServerGroupAttributeResponse.RequestId = context.StringValue("DescribeVServerGroupAttribute.RequestId");
            describeVServerGroupAttributeResponse.VServerGroupId = context.StringValue("DescribeVServerGroupAttribute.VServerGroupId");
            describeVServerGroupAttributeResponse.VServerGroupName = context.StringValue("DescribeVServerGroupAttribute.VServerGroupName");

            List<DescribeVServerGroupAttributeResponse.BackendServer> backendServers = new List<DescribeVServerGroupAttributeResponse.BackendServer>();
            for (int i = 0; i < context.Length("DescribeVServerGroupAttribute.BackendServers.Length"); i++) {
                DescribeVServerGroupAttributeResponse.BackendServer backendServer = new DescribeVServerGroupAttributeResponse.BackendServer();
                backendServer.ServerId = context.StringValue("DescribeVServerGroupAttribute.BackendServers["+ i +"].ServerId");
                backendServer.Port = context.IntegerValue("DescribeVServerGroupAttribute.BackendServers["+ i +"].Port");
                backendServer.Weight = context.IntegerValue("DescribeVServerGroupAttribute.BackendServers["+ i +"].Weight");

                backendServers.Add(backendServer);
            }
            describeVServerGroupAttributeResponse.BackendServers = backendServers;

            return describeVServerGroupAttributeResponse;
        }
DescribeVServerGroupAttributeResponseUnmarshaller