public object LoadObject(object key) { XmlNode node = m_xmlsc.CurrentNode.SelectSingleNode(key.ToString()); m_xmlsc.PushNode(node); Type type = m_xmlsc.GetTypeFromNode(node); string enumText = (string)m_xmlsc.LoadObject(key); m_xmlsc.PopNode(); return(Enum.Parse(type, enumText, false)); }
public object LoadObject(object key) { XmlNode node = m_xmlsc.CurrentNode.SelectSingleNode(key.ToString()); m_xmlsc.PushNode(node); object target = m_xmlsc.LoadObject("Target"); string method = (string)m_xmlsc.LoadObject("Method"); Delegate del = Delegate.CreateDelegate(m_xmlsc.GetTypeFromNode(node), target, method); m_xmlsc.PopNode(); return(del); }