Пример #1
0
 internal Todo(XmlReader rdr)
 {
     rdr.ReadStartElement("todo");
     this.Id           = rdr.ReadElementContentAsInt("id", "");
     this.Title        = rdr.ReadElementString("title");
     this.Description  = rdr.ReadElementString("description");
     this.DueDate      = Convert.ToDateTime(rdr.ReadElementString("due_date"));
     this.Flagged      = rdr.ReadElementContentAsBoolean("flagged", "");
     this.Complete     = rdr.ReadElementContentAsBoolean("complete", "");
     this.AssignedBy   = rdr.ReadElementString("assigned_by");
     this.AssignedTo   = rdr.ReadElementString("assigned_to");
     this.Participants = Participant.BuildList(rdr);
     this.Tags         = Tag.BuildList(rdr);
     this.Comments     = MegaComment.BuildList(rdr);
     this.CreatedAt    = DateTime.Parse(rdr.ReadElementString("created_at"));
     this.UpdatedAt    = DateTime.Parse(rdr.ReadElementString("updated_at"));
     rdr.ReadEndElement();
 }