示例#1
0
        /// <summary>
        /// Process opcode references into offset values.
        /// </summary>
        /// <param name="opm">A delegate that does the
        /// processing.</param>
        public void OffsetProc(OffsetProcMethod opm)
        {
            if (this.Mnemonic == Opcode.Mnemonics.LookupSwitch)
            {
                for (int i = 0; i < this.Args.Length; i++)
                {
                    if (i != 1)
                    {
                        this.Args[i] = opm(this.Args[i]);
                    }
                }
                return;
            }

            Opcode.ArgType[] types = this.ArgTypes;
            for (int i = 0; i < this.Args.Length; i++)
            {
                Opcode.ArgType argType = types[i];
                if (argType == Opcode.ArgType.OffsetS24)
                {
                    this.Args[i] = opm(this.Args[i]);
                }
            }
        }
示例#2
0
        /// <summary>
        /// Process opcode references into offset values.
        /// </summary>
        /// <param name="opm">A delegate that does the
        /// processing.</param>
        public void OffsetProc(OffsetProcMethod opm)
        {
            if (this.Mnemonic == Opcode.Mnemonics.LookupSwitch)
            {
                for (int i = 0; i < this.Args.Length; i++)
                {
                    if (i != 1)
                    {
                        this.Args[i] = opm(this.Args[i]);
                    }
                }
                return;
            }

            Opcode.ArgType[] types = this.ArgTypes;
            for (int i = 0; i < this.Args.Length; i++)
            {
                Opcode.ArgType argType = types[i];
                if (argType == Opcode.ArgType.OffsetS24)
                {
                    this.Args[i] = opm(this.Args[i]);
                }
            }
        }