Example #1
0
 void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader)
 {
     reader.MoveToAttribute("ActionId");
     ActionId = reader.ReadContentAsInt();
     reader.MoveToAttribute("Success");
     Success = bool.Parse(reader.ReadContentAsString());
     reader.MoveToAttribute("AffectedRows");
     AffectedRows = reader.ReadContentAsInt();
     reader.MoveToAttribute("RowVersion");
     RowVersion = reader.ReadContentAsLong();
     reader.MoveToElement();
     reader.ReadStartElement();
     if (!reader.IsEmptyElement)
     {
         reader.ReadStartElement("FailureMessage");
         FailureMessage = reader.ReadString();
         reader.ReadEndElement();
     }
     else
     {
         FailureMessage = null;
         reader.Skip();
     }
     if (!reader.IsEmptyElement)
     {
         reader.ReadStartElement("Result");
         Result = reader.ReadContentAsObject();
         reader.ReadEndElement();
     }
     else
     {
         Result = null;
         reader.Skip();
     }
     if (!reader.IsEmptyElement)
     {
         reader.ReadStartElement("Parameters", Namespaces.Data);
         var parameters = new List <PersistenceParameter>();
         while (reader.NodeType != System.Xml.XmlNodeType.EndElement)
         {
             if (reader.LocalName == "Parameter")
             {
                 var parameter = new PersistenceParameter();
                 ((System.Xml.Serialization.IXmlSerializable)parameter).ReadXml(reader);
                 parameters.Add(parameter);
             }
             else
             {
                 reader.Skip();
             }
         }
         Parameters = parameters.ToArray();
         reader.ReadEndElement();
     }
     else
     {
         reader.Skip();
     }
     if (!reader.IsEmptyElement)
     {
         reader.ReadStartElement("AlternativeActions", Namespaces.Data);
         var actions = new List <PersistenceActionResult>();
         while (reader.NodeType != System.Xml.XmlNodeType.EndElement)
         {
             if (reader.LocalName == "PersistenceActionResult")
             {
                 var action = new PersistenceActionResult();
                 ((System.Xml.Serialization.IXmlSerializable)action).ReadXml(reader);
                 actions.Add(action);
             }
             else
             {
                 reader.Skip();
             }
         }
         AlternativeActions = actions.ToArray();
         reader.ReadEndElement();
     }
     else
     {
         reader.Skip();
     }
     if (!reader.IsEmptyElement)
     {
         reader.ReadStartElement("BeforeActions", Namespaces.Data);
         var actions = new List <PersistenceActionResult>();
         while (reader.NodeType != System.Xml.XmlNodeType.EndElement)
         {
             if (reader.LocalName == "PersistenceActionResult")
             {
                 var action = new PersistenceActionResult();
                 ((System.Xml.Serialization.IXmlSerializable)action).ReadXml(reader);
                 actions.Add(action);
             }
             else
             {
                 reader.Skip();
             }
         }
         BeforeActions = actions.ToArray();
         reader.ReadEndElement();
     }
     else
     {
         reader.Skip();
     }
     if (!reader.IsEmptyElement)
     {
         reader.ReadStartElement("AfterActions", Namespaces.Data);
         var actions = new List <PersistenceActionResult>();
         while (reader.NodeType != System.Xml.XmlNodeType.EndElement)
         {
             if (reader.LocalName == "PersistenceActionResult")
             {
                 var action = new PersistenceActionResult();
                 ((System.Xml.Serialization.IXmlSerializable)action).ReadXml(reader);
                 actions.Add(action);
             }
             else
             {
                 reader.Skip();
             }
         }
         AfterActions = actions.ToArray();
         reader.ReadEndElement();
     }
     else
     {
         reader.Skip();
     }
     reader.ReadEndElement();
 }