コード例 #1
0
        public static CustomerGatewayUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new CustomerGatewayUnmarshaller();
            }

            return(instance);
        }
コード例 #2
0
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            DescribeCustomerGatewaysResponse response = new DescribeCustomerGatewaysResponse();

            int targetDepth = 2;

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("customerGatewaySet/item", targetDepth))
                    {
                        response.CustomerGateways.Add(CustomerGatewayUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                }
            }


            return(response);
        }