예제 #1
0
 void IXmlSerializable.ReadXml(XmlReader reader)
 {
     if (reader.MoveToContent() == XmlNodeType.Element && reader.LocalName == "Query")
     {
         Id   = int.Parse(reader["Id"]);
         Path = reader["Path"];
         if (reader.ReadToDescendant("Select"))
         {
             while (reader.MoveToContent() == XmlNodeType.Element && (reader.LocalName == "Select" || reader.LocalName == "Suppress"))
             {
                 if (reader.LocalName == "Select")
                 {
                     CSelect sel = new CSelect(this, null);
                     sel.ReadXml(reader);
                     Select.Add(sel);
                 }
                 else
                 {
                     CSuppress sup = new CSuppress(this, null);
                     sup.ReadXml(reader);
                     Suppress.Add(sup);
                 }
             }
         }
         reader.ReadEndElement();
     }
 }