Пример #1
0
        public static SpotInstanceRequestUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new SpotInstanceRequestUnmarshaller();
            }

            return(instance);
        }
Пример #2
0
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            DescribeSpotInstanceRequestsResponse response = new DescribeSpotInstanceRequestsResponse();

            int targetDepth = 2;

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("spotInstanceRequestSet/item", targetDepth))
                    {
                        response.SpotInstanceRequests.Add(SpotInstanceRequestUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                }
            }


            return(response);
        }