public static XRoot Parse(string text, LoadOptions options) { var root = new XRoot { _xDocument = XDocument.Parse(text, options) }; var typedRoot = XTypedServices.ToXTypedElement(root._xDocument.Root, LinqToXsdTypeManager.Instance); if ((typedRoot == null)) { throw new LinqToXsdException("Invalid root element in xml document."); } root._rootObject = typedRoot; return(root); }
public static XRoot Load(XmlReader xmlReader) { var root = new XRoot { _xDocument = XDocument.Load(xmlReader) }; var typedRoot = XTypedServices.ToXTypedElement(root._xDocument.Root, LinqToXsdTypeManager.Instance); if ((typedRoot == null)) { throw new LinqToXsdException("Invalid root element in xml document."); } root._rootObject = typedRoot; return(root); }
public static XRoot Parse(string text, LoadOptions options) { var root = new XRoot { _xDocument = XDocument.Parse(text, options) }; var typedRoot = XTypedServices.ToXTypedElement(root._xDocument.Root, LinqToXsdTypeManager.Instance); if ((typedRoot == null)) { throw new LinqToXsdException("Invalid root element in xml document."); } root._rootObject = typedRoot; return root; }
public static XRoot Load(XmlReader xmlReader) { var root = new XRoot { _xDocument = XDocument.Load(xmlReader) }; var typedRoot = XTypedServices.ToXTypedElement(root._xDocument.Root, LinqToXsdTypeManager.Instance); if ((typedRoot == null)) { throw new LinqToXsdException("Invalid root element in xml document."); } root._rootObject = typedRoot; return root; }