void ProcessRootTypes(IEnumerable<Type> rootTypes, XmlDocument doc, ICollection<object> result)
{
foreach (var rootType in rootTypes)
{
var m = Process(doc.DocumentElement, null, rootType);
if (m == null)
{
throw new SerializationException("Could not deserialize message.");
}
result.Add(m);
}
}