Catel.Fody.InstructionExtensions.IsOpCode C# (CSharp) Method

IsOpCode() public static method

public static IsOpCode ( this instruction ) : bool
instruction this
return bool
        public static bool IsOpCode(this Instruction instruction, params OpCode[] opCodes)
        {
            if (opCodes.Length == 0)
            {
                return true;
            }

            foreach (var opCode in opCodes)
            {
                if (instruction.OpCode == opCode)
                {
                    return true;
                }
            }

            return false;
        }