public virtual object Clone() { Event clone = new Event(); clone.CopyAttributesFrom(this); clone.m_name = m_name; clone.m_executeType = m_executeType; clone.m_class = m_class; clone.m_partName = m_partName; clone.m_partClass = m_partClass; clone.m_ExecuteObject = m_ExecuteObject; return clone; }
public void Process(XmlNode n) { if (n.Name != IAM) return; // cannot have attributes if (n.HasChildNodes) { XmlNodeList xnl = n.ChildNodes; if (xnl.Count != 2) { // parameter mismatch throw new XmlElementMismatchException("Your input document is not in the correct format. <equal> should have only 2 elements."); } else { for (int i = 0; i < xnl.Count; i++) { switch (xnl[i].Name) { case EVENT: m_event = new Event(xnl[0]);//Possible bug.... break; case CONSTANT: m_childType = CONSTANT; m_childObject = new Constant(xnl[0]); break; case PROPERTY: m_childType = PROPERTY; m_childObject = new Property(xnl[0]); break; case REFERENCE: m_childType = REFERENCE; m_childObject = new Reference(xnl[0]); break; case OP: m_childType = OP; m_childObject = new Op(xnl[0], m_partTree); break; } } // error handling // event must be <> null if (m_event == null) { throw new NotInitializedException("Your input document is not in the correct format. <equal> must have 1 <event>."); } // at least one of (constant, property, reference, op) must be init if (m_childObject == null) { throw new NotInitializedException("Your input document is not in the correct format. Check your syntax near <equal>."); } } } }