private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeConfigurationSetResponse response)
{
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("ConfigurationSet", targetDepth))
{
var unmarshaller = ConfigurationSetUnmarshaller.Instance;
response.ConfigurationSet = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("EventDestinations/member", targetDepth))
{
var unmarshaller = EventDestinationUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
response.EventDestinations.Add(item);
continue;
}
}
}
return;
}