System.Xml.Xsl.XsltOld.Event.Output C# (CSharp) Method

Output() public abstract method

public abstract Output ( Processor processor, ActionFrame frame ) : bool
processor Processor
frame ActionFrame
return bool
        public abstract bool Output(Processor processor, ActionFrame frame);

Usage Example

Ejemplo n.º 1
0
        internal override void Execute(Processor processor, ActionFrame frame)
        {
            Debug.Assert(processor != null && frame != null);
            Debug.Assert(_copyEvents != null && _copyEvents.Count > 0);

            switch (frame.State)
            {
            case Initialized:
                frame.Counter = 0;
                frame.State   = Outputting;
                goto case Outputting;

            case Outputting:
                Debug.Assert(frame.State == Outputting);

                while (processor.CanContinue)
                {
                    Debug.Assert(frame.Counter < _copyEvents.Count);
                    Event copyEvent = (Event)_copyEvents[frame.Counter];

                    if (copyEvent.Output(processor, frame) == false)
                    {
                        // This event wasn't processed
                        break;
                    }

                    if (frame.IncrementCounter() >= _copyEvents.Count)
                    {
                        frame.Finished();
                        break;
                    }
                }
                break;

            default:
                Debug.Fail("Invalid CopyCodeAction execution state");
                break;
            }
        }