System.Xml.Xsl.XsltOld.ActionFrame.Execute C# (CSharp) Method

Execute() private method

private Execute ( Processor processor ) : bool
processor Processor
return bool
        internal bool Execute(Processor processor) {
            if (this.action == null) {
                return true;
            }

            // Execute the action
            this.action.Execute(processor, this);

            // Process results
            if (State == Action.Finished) {
                // Advanced to next action
                if(this.container != null) {
                    this.currentAction ++;
                    this.action =  this.container.GetAction(this.currentAction);
                    State = Action.Initialized;
                }
                else {
                    this.action = null;
                }
                return this.action == null;
            }

            return false;                       // Do not pop, unless specified otherwise
        }

Usage Example

Ejemplo n.º 1
0
        //
        //  Execution part of processor
        //
        internal void Execute()
        {
            Debug.Assert(this.actionStack != null);

            while (this.execResult == ExecResult.Continue)
            {
                ActionFrame frame = (ActionFrame)this.actionStack.Peek();

                if (frame == null)
                {
                    Debug.Assert(this.builder != null);
                    this.builder.TheEnd();
                    ExecutionResult = ExecResult.Done;
                    break;
                }

                // Execute the action which was on the top of the stack
                if (frame.Execute(this))
                {
                    this.actionStack.Pop();
                }
            }

            if (this.execResult == ExecResult.Interrupt)
            {
                this.execResult = ExecResult.Continue;
            }
        }