private static void UnmarshallResult(XmlUnmarshallerContext context, ListObjectsByTagsResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Bucket", targetDepth))
{
response.BucketName = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("ContinuationToken", targetDepth))
{
response.ContinuationToken = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("NextContinuationToken", targetDepth))
{
response.NextContinuationToken = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("MaxKeys", targetDepth))
{
response.MaxKeys = IntUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("IsTruncated", targetDepth))
{
response.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("EncodingType", targetDepth))
{
response.EncodingType = EncodingType.FindValue(StringUnmarshaller.GetInstance().Unmarshall(context));
continue;
}
if (context.TestExpression("Contents", targetDepth))
{
response.Contents.Add(TaggedResourceUnmarshaller.Instance.Unmarshall(context));
}
}
}
}