示例#1
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            UnassignIpv6AddressesResponse response = new UnassignIpv6AddressesResponse();

            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("networkInterfaceId", targetDepth))
                    {
                        var unmarshaller = StringUnmarshaller.Instance;
                        response.NetworkInterfaceId = unmarshaller.Unmarshall(context);
                        continue;
                    }
                    if (context.TestExpression("unassignedIpv6Addresses/item", targetDepth))
                    {
                        var unmarshaller = StringUnmarshaller.Instance;
                        var item         = unmarshaller.Unmarshall(context);
                        response.UnassignedIpv6Addresses.Add(item);
                        continue;
                    }
                }
            }

            return(response);
        }
示例#2
0
        public static UnassignIpv6AddressesResponse Unmarshall(UnmarshallerContext context)
        {
            UnassignIpv6AddressesResponse unassignIpv6AddressesResponse = new UnassignIpv6AddressesResponse();

            unassignIpv6AddressesResponse.HttpResponse = context.HttpResponse;
            unassignIpv6AddressesResponse.RequestId    = context.StringValue("UnassignIpv6Addresses.RequestId");

            return(unassignIpv6AddressesResponse);
        }