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

PushValue() public method

Push current item onto the stack without affecting Location.
public PushValue ( ) : void
return void
        public void PushValue() {
            switch (this.storage.Location) {
                case ItemLocation.Stack:
                    this.helper.Emit(OpCodes.Dup);
                    break;

                case ItemLocation.Parameter:
                    this.helper.LoadParameter(this.storage.ParameterLocation);
                    break;

                case ItemLocation.Local:
                    this.helper.Emit(OpCodes.Ldloc, this.storage.LocalLocation);
                    break;

                case ItemLocation.Current:
                    this.helper.Emit(OpCodes.Ldloca, this.storage.CurrentLocation);
                    this.helper.Call(this.storage.CurrentLocation.LocalType.GetMethod("get_Current"));
                    break;

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