private static void UnmarshallResult(XmlUnmarshallerContext context, GetBucketMetricsConfigurationResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
response.MetricsConfiguration = new MetricsConfiguration();
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Filter", targetDepth))
{
response.MetricsConfiguration.MetricsFilter = new MetricsFilter(){
MetricsFilterPredicate = (MetricsPredicateListFilterUnmarshaller.Instance.Unmarshall(context))[0]
};
continue;
}
if (context.TestExpression("Id", targetDepth))
{
response.MetricsConfiguration.MetricsId = StringUnmarshaller.Instance.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return;
}
}
return;
}