/// <summary> /// Reads specified XML stream into an object graph with specified /// type as its root. /// </summary> /// <param name="type">Type of root object</param> /// <param name="s">Input stream object (caller is responsible for closing the stream)</param> /// <returns>Read object or null if an error occurs </returns> public object Read(Type type, System.IO.Stream s) { Object res = null; ObjectTreeXmlReader otxr = new ObjectTreeXmlReader(); res = otxr.Read(type, s); return(res); }
/// <summary> /// Reads specified XML file into an object graph with specified /// type as its root. /// </summary> /// <param name="type">Type of root object</param> /// <param name="fi">FileInfo object describing the file</param> /// <returns>Read object, or null if an error occurs</returns> public object Read(Type type, System.IO.FileInfo fi) { ObjectTreeXmlReader otxr = new ObjectTreeXmlReader(); return(otxr.Read(type, fi)); }