Beispiel #1
0
 XElement IActionVisitor <XElement, XElement> .Visit(ActionImplementsOp action, XElement param)
 {
     return(new XElement(XActionNames.FromAction(action)));
 }
Beispiel #2
0
 XElement IActionVisitor <XElement, XElement> .Visit(ActionGetProperty action, XElement param)
 {
     return(new XElement(XActionNames.FromAction(action)));
 }
Beispiel #3
0
 XElement IActionVisitor <XElement, XElement> .Visit(ActionStoreRegister action, XElement arg)
 {
     return(new XElement(XActionNames.FromAction(action),
                         new XAttribute("reg", action.RegisterNumber)));
 }
Beispiel #4
0
 XElement IActionVisitor <XElement, XElement> .Visit(ActionGetURL2 action, XElement param)
 {
     return(new XElement(XActionNames.FromAction(action),
                         new XAttribute("flags", action.Flags)));
 }
Beispiel #5
0
 XElement IActionVisitor <XElement, XElement> .Visit(ActionSetVariable action, XElement param)
 {
     return(new XElement(XActionNames.FromAction(action)));
 }
Beispiel #6
0
 XElement IActionVisitor <XElement, XElement> .Visit(ActionJump action, XElement param)
 {
     return(new XElement(XActionNames.FromAction(action),
                         new XAttribute("byteOffset", FormatBranchOffset(action.BranchOffset))));
 }
Beispiel #7
0
 XElement IActionVisitor <XElement, XElement> .Visit(ActionGotoFrame action, XElement param)
 {
     return(new XElement(XActionNames.FromAction(action), new XAttribute("frame", action.Frame)));
 }
Beispiel #8
0
        /// <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));
        }