XElement IActionVisitor <XElement, XElement> .Visit(ActionImplementsOp action, XElement param) { return(new XElement(XActionNames.FromAction(action))); }
XElement IActionVisitor <XElement, XElement> .Visit(ActionGetProperty action, XElement param) { return(new XElement(XActionNames.FromAction(action))); }
XElement IActionVisitor <XElement, XElement> .Visit(ActionStoreRegister action, XElement arg) { return(new XElement(XActionNames.FromAction(action), new XAttribute("reg", action.RegisterNumber))); }
XElement IActionVisitor <XElement, XElement> .Visit(ActionGetURL2 action, XElement param) { return(new XElement(XActionNames.FromAction(action), new XAttribute("flags", action.Flags))); }
XElement IActionVisitor <XElement, XElement> .Visit(ActionSetVariable action, XElement param) { return(new XElement(XActionNames.FromAction(action))); }
XElement IActionVisitor <XElement, XElement> .Visit(ActionJump action, XElement param) { return(new XElement(XActionNames.FromAction(action), new XAttribute("byteOffset", FormatBranchOffset(action.BranchOffset)))); }
XElement IActionVisitor <XElement, XElement> .Visit(ActionGotoFrame action, XElement param) { return(new XElement(XActionNames.FromAction(action), new XAttribute("frame", action.Frame))); }
/// <summary> /// Serializes action to xml node. /// </summary> /// <param name="action">Action to serialize.</param> /// <returns>Xml node representing action.</returns> public XElement Serialize(ActionBase action) { var xAction = new XElement(XActionNames.FromAction(action)); return(action.AcceptVisitor(this, xAction)); }