System.Xml.Xsl.IlGen.IteratorDescriptor.EnsureStack C# (CSharp) Method

EnsureStack() public method

Ensure that the current item is pushed onto the stack.
public EnsureStack ( ) : void
return void
        public void EnsureStack() {
            switch (this.storage.Location) {
                case ItemLocation.Stack:
                    // Already on the stack
                    return;

                case ItemLocation.Parameter:
                case ItemLocation.Local:
                case ItemLocation.Current:
                    PushValue();
                    break;

                case ItemLocation.Global:
                    // Call method that computes the value of this global value
                    this.helper.LoadQueryRuntime();
                    this.helper.Call(this.storage.GlobalLocation);
                    break;

                default:
                    Debug.Assert(false, "Invalid location: " + this.storage.Location);
                    break;
            }

            this.storage = this.storage.ToStack();
        }