public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DescribeHostReservationOfferingsResponse response = new DescribeHostReservationOfferingsResponse();
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("nextToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NextToken = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("offeringSet/member", targetDepth))
{
var unmarshaller = HostOfferingUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
response.OfferingSet.Add(item);
continue;
}
}
}
return response;
}