protected object ParseList(Type listType, XContainer node, string rootNodeName, string childNodeName) { if (!listType.IsGenericType) { return(null); } if (!node.Descendants(rootNodeName).Any()) { return(null); } Type objType = listType.GetGenericArguments().First(); var childNodes = node.Descendants(rootNodeName).First().Descendants(childNodeName); var count = childNodes.Count(); if (count > 0) { var rtn = ObjectCreator.Create(listType, Type.EmptyTypes, null); foreach (var childNode in childNodes) { object obj = ParseNode(objType, childNode); FastReflection.AddObjectToList(rtn, obj); } return(rtn); } else { return(null); } }