예제 #1
0
        /// <summary>
        /// Creates a new <see cref="SameLocals1StackItemFrame"/>.
        /// </summary>
        /// <param name="tag">The tag.</param>
        /// <param name="stackTop">The type of the top item on the stack.</param>
        /// <exception cref="ArgumentOutOfRangeException">When <paramref name="tag"/> is less than 64 or greater than 127.</exception>
        public SameLocals1StackItemFrame(byte tag, VerificationInfo stackTop)
            : base(tag)
        {
            if (tag < 64 || tag > 127)
            {
                throw new ArgumentOutOfRangeException(nameof(tag));
            }

            StackTop = stackTop;
        }
예제 #2
0
        /// <summary>
        /// Creates a new <see cref="SameLocals1StackItemFrameExtended"/>.
        /// </summary>
        /// <param name="tag">The tag.</param>
        /// <param name="offsetDelta">The offset to the next frame in the bytecode.</param>
        /// <param name="stackTop">The type of the top item on the stack.</param>
        /// <exception cref="ArgumentOutOfRangeException">When <paramref name="tag"/> is not 247.</exception>
        public SameLocals1StackItemFrameExtended(byte tag, ushort offsetDelta, VerificationInfo stackTop)
            : base(tag)
        {
            if (tag != 247)
            {
                throw new ArgumentOutOfRangeException(nameof(tag));
            }

            OffsetDelta = offsetDelta;
            StackTop    = stackTop;
        }