/// <summary> /// Deserializes objects from XML file /// </summary> /// <param name="stream">The stream.</param> /// <returns>Deserialized object</returns> internal static SortedDictionary <string, TopicNode> FromXmlStream(Stream stream) { try { StreamReader reader = new StreamReader(stream); Topics tpcs = null; using ( reader ) { XmlSerializer xmlSerializer = new XmlSerializer(typeof(Topics)); tpcs = (Topics)xmlSerializer.Deserialize(reader); } if (tpcs == null) { return(null); } return(tpcs.CreateDictionary()); } catch (Exception) { return(null); } }