private static void UnmarshallResult(XmlUnmarshallerContext context,DescribeResizeResponse 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("TargetNodeType", targetDepth))
{
response.TargetNodeType = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("TargetNumberOfNodes", targetDepth))
{
response.TargetNumberOfNodes = IntUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("TargetClusterType", targetDepth))
{
response.TargetClusterType = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("Status", targetDepth))
{
response.Status = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("ImportTablesCompleted/member", targetDepth))
{
response.ImportTablesCompleted.Add(StringUnmarshaller.GetInstance().Unmarshall(context));
continue;
}
if (context.TestExpression("ImportTablesInProgress/member", targetDepth))
{
response.ImportTablesInProgress.Add(StringUnmarshaller.GetInstance().Unmarshall(context));
continue;
}
if (context.TestExpression("ImportTablesNotStarted/member", targetDepth))
{
response.ImportTablesNotStarted.Add(StringUnmarshaller.GetInstance().Unmarshall(context));
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return;
}
}
return;
}