private static void UnmarshallResult(XmlUnmarshallerContext context,DomainMetadataResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("ItemCount", targetDepth))
{
response.ItemCount = IntUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("ItemNamesSizeBytes", targetDepth))
{
response.ItemNamesSizeBytes = LongUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("AttributeNameCount", targetDepth))
{
response.AttributeNameCount = IntUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("AttributeNamesSizeBytes", targetDepth))
{
response.AttributeNamesSizeBytes = LongUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("AttributeValueCount", targetDepth))
{
response.AttributeValueCount = IntUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("AttributeValuesSizeBytes", targetDepth))
{
response.AttributeValuesSizeBytes = LongUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("Timestamp", targetDepth))
{
response.Timestamp = IntUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return;
}
}
return;
}