示例#1
0
 /// <summary>
 /// Handler called after an Action has beeen executed.
 /// </summary>
 /// <param name="sender">The sender</param>
 /// <param name="e">The action in fact</param>
 protected virtual void OnAfterAction(object sender, EventArgs e)
 {
     Codegen.Actions.Action action = (Codegen.Actions.Action)e;
     //Collect erased nodes.
     if (action is TypeCobol.Codegen.Actions.IEraseAction)
     {
         TypeCobol.Codegen.Actions.IEraseAction erase = (TypeCobol.Codegen.Actions.IEraseAction)action;
         IList <Node> nodes = erase.ErasedNodes;
         if (nodes != null)
         {
             ErasedNodes.AddRange(nodes);
         }
     }
 }
示例#2
0
 /// <summary>
 /// Handler called after an Action has beeen executed.
 /// </summary>
 /// <param name="sender">The sender</param>
 /// <param name="e">The action in fact</param>
 protected virtual void OnAfterAction(object sender, EventArgs e)
 {
     Codegen.Actions.Action action = (Codegen.Actions.Action)e;
     //Collect erased nodes.
     if (action is TypeCobol.Codegen.Actions.IEraseAction)
     {
         TypeCobol.Codegen.Actions.IEraseAction erase = (TypeCobol.Codegen.Actions.IEraseAction)action;
         IList <Node> nodes = erase.ErasedNodes;
         if (nodes != null)
         {
             foreach (Node node in nodes)
             {
                 node.SetFlag(Node.Flag.GeneratorErasedNode, true);
                 ErasedNodes.Add(node);
             }
         }
     }
 }