Esempio n. 1
0
 public void WriteXml(XmlWriter writer)
 {
     if (Name != null)
     {
         writer.WriteAttributeString("Name", Name);
     }
     if (Author != null)
     {
         writer.WriteAttributeString("Author", Author);
     }
     if (Date != null)
     {
         writer.WriteAttributeString("Date", Date);
     }
     if (Version != null)
     {
         writer.WriteAttributeString("Version", Version);
     }
     if (Pin != PSpace.UNSHARED)
     {
         writer.WriteAttributeString("Pin", Pin.ToString());
     }
     if (StartOffset != 0)
     {
         writer.WriteAttributeString("StartOffset", StartOffset.ToString());
     }
     foreach (IInstruction i in Instructions)
     {
         writer.WriteStartElement("Instruction");
         writer.WriteAttributeString("Operation", i.Operation.ToString());
         writer.WriteAttributeString("Modifier", i.Modifier.ToString());
         writer.WriteAttributeString("ModeA", ModeHelper.ToString(i.ModeA));
         writer.WriteAttributeString("ValueA", i.ValueA.ToString());
         writer.WriteAttributeString("ModeB", ModeHelper.ToString(i.ModeB));
         writer.WriteAttributeString("ValueB", i.ValueB.ToString());
         writer.WriteEndElement();
     }
 }
Esempio n. 2
0
 public override string ToString()
 {
     return
         (Operation + "." + Modifier.ToString().PadRight(3) + ModeHelper.ToString(ModeA) +
          ValueA.ToString().PadLeft(6) + ", " + ModeHelper.ToString(ModeB) + ValueB.ToString().PadLeft(6));
 }