private static DataTypeDescriptor LoadFromFile(string filePath)
{
XDocument doc;
try
{
doc = XDocumentUtils.Load(filePath, LoadOptions.SetBaseUri | LoadOptions.SetLineInfo);
}
catch (XmlException e)
{
throw new ConfigurationErrorsException("Error loading meta data file '{0}': {1}".FormatWith(filePath, e.Message), e, filePath, e.LineNumber);
}
return DataTypeDescriptor.FromXml(doc.Root);
}