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