Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="xml"></param>
        /// <param name="type"></param>
        /// <param name="logCallback">null does not do any logging at all</param>
        /// <returns></returns>
        public static object InnerFromXml(string xml, Type type, LogCallback logCallback)
        {
            if (string.IsNullOrEmpty(xml))
            {
                return(null);
            }
            if (null == type)
            {
                return(null);
            }
            InnerFromXmlProvider innerFromXmlProvider = new InnerFromXmlProvider(xml, type, logCallback);
            object result = innerFromXmlProvider.InnerFromXml();

            return(result);
        }
 private static object FromXml(string xml, Type type,
                               XmlNodeEventHandler UnknownNode, XmlElementEventHandler UnknownElement, XmlAttributeEventHandler UnknownAttribute,
                               UnreferencedObjectEventHandler UnreferencedObject)
 {
     if (null == type)
     {
         return(null);
     }
     try
     {
         return(InnerFromXmlProvider.InnerFromXml(xml, type, UnknownNode, UnknownElement, UnknownAttribute, UnreferencedObject));
     }
     catch (Exception)
     {
         return(InnerFromXmlProvider.InnerFromXml(xml, type, UnknownNode, UnknownElement, UnknownAttribute, UnreferencedObject));
     }
 }
 private static object InnerFromXml(string xml, Type type, LogCallback logCallback)
 {
     return(InnerFromXmlProvider.InnerFromXml(xml, type, logCallback));
 }