Example #1
0
        protected void LoadThingField(XmlElement Node, IThing T)
        {
            XmlElement ThingRoot = Node.SelectSingleNode(String.Format("./child::thing[@type = '{0}']", T.GetType().Name)) as XmlElement;

            if (ThingRoot != null)
            {
                T.Load(ThingRoot);
            }
            else
            {
                throw new ArgumentException(String.Format(I18N.GetText("InvalidThingField"), T.TypeName));
            }
        }
Example #2
0
 protected void LoadThingField(XmlElement Node, IThing T)
 {
     XmlElement ThingRoot = Node.SelectSingleNode(String.Format("./child::thing[@type = '{0}']", T.GetType().Name)) as XmlElement;
       if (ThingRoot != null)
     T.Load(ThingRoot);
       else
     throw new ArgumentException(String.Format(I18N.GetText("InvalidThingField"), T.TypeName));
 }