Beispiel #1
0
 public override void LoadMap(XmlNode node, Assembly typeProvider)
 {
     base.LoadMap(node, typeProvider);
     //load I/S
     foreach (XmlNode nd in node.ChildNodes)
     {
         if (nd.Name == RAIS.XML_I)                 //I
         {
             foreach (XmlNode nd1 in nd.ChildNodes)
             {
                 RAIS_R r = new RAIS_R((RAIS_A)this);
                 r.LoadMap(nd1, typeProvider);
                 AddI(r);
             }
         }
         else if (nd.Name == XML_S)                 //S
         {
             foreach (XmlNode nd1 in nd.ChildNodes)
             {
                 RAIS_A t = new RAIS_A((RAIS_A)this);
                 t.LoadMap(nd1, typeProvider);
                 AddS(t);
             }
         }
     }
 }
Beispiel #2
0
        /// <summary>
        /// populate the object map by loading XML.
        /// </summary>
        /// <param name="node"></param>
        public virtual void LoadMap(XmlNode node, Assembly typeProvider)
        {
            this.Name = GetAttribute(node, RAIS.XMLATT_NAME);
            string s = GetAttribute(node, RAIS.TYPE);

            this.Type = typeProvider.GetType(s, true);
            //load R/A/I/S
            foreach (XmlNode nd in node.ChildNodes)
            {
                if (nd.Name == XML_R)                 //R
                {
                    RAIS_R r = new RAIS_R((RAIS)this);
                    r.LoadMap(nd, typeProvider);
                    AddR(r);
                }
                else if (nd.Name == XML_A)                 //A
                {
                    RAIS_A t = new RAIS_A((RAIS)this);
                    t.LoadMap(nd, typeProvider);
                    AddA(t);
                }
            }
        }