public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeVpcAttributeResponse response = new DescribeVpcAttributeResponse(); int targetDepth = 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("vpcId", targetDepth)) { response.VpcId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("enableDnsSupport/value", targetDepth)) { response.EnableDnsSupport = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("enableDnsHostnames/value", targetDepth)) { response.EnableDnsHostnames = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } } return response; }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeVpcAttributeResponse response = new DescribeVpcAttributeResponse(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth = 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("enableDnsHostnames/value", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.EnableDnsHostnames = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("enableDnsSupport/value", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.EnableDnsSupport = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("vpcId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.VpcId = unmarshaller.Unmarshall(context); continue; } } } return response; }