Exemple #1
0
        public void ReadXml(XmlReader reader)
        {
            while (reader.Read())
            {
                if (reader.IsStartElement())
                {
                    switch (reader.Name)
                    {
                    case "Work":
                        work = new WorkOfArt();
                        work.ReadXml(reader);
                        break;

                    case "Fund":
                        fund = new Fund();
                        fund.ReadXml(reader);
                        break;

                    case "Location":
                        location = (Location)Enum.Parse(typeof(Location), reader.Value);
                        fund.ReadXml(reader);
                        break;

                    case "Price":
                        reader.Read();
                        price = Int32.Parse(reader.Value);
                        break;
                    }
                }

                if (reader.Name.Equals("Exhibit"))
                {
                    break;
                }
            }
        }
Exemple #2
0
 public Exhibit()
 {
     this.work     = new WorkOfArt();
     this.location = new Location();
     this.fund     = new Fund();
 }