Ejemplo n.º 1
0
        public static InternetGatewayUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new InternetGatewayUnmarshaller();
            }

            return(instance);
        }
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            DescribeInternetGatewaysResponse response = new DescribeInternetGatewaysResponse();

            int targetDepth = 2;

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("internetGatewaySet/item", targetDepth))
                    {
                        response.InternetGateways.Add(InternetGatewayUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                }
            }


            return(response);
        }