diff --git a/src/Castle.Core/DynamicProxy/Generators/Emitters/OpCodeUtil.cs b/src/Castle.Core/DynamicProxy/Generators/Emitters/OpCodeUtil.cs index d95272ca10..4b1ac75ed3 100644 --- a/src/Castle.Core/DynamicProxy/Generators/Emitters/OpCodeUtil.cs +++ b/src/Castle.Core/DynamicProxy/Generators/Emitters/OpCodeUtil.cs @@ -62,32 +62,6 @@ public static void EmitLoadIndirectOpCodeForType(ILGenerator gen, Type type) } } - /// - /// Emits a load opcode of the appropriate kind for a constant string or - /// primitive value. - /// - public static void EmitLoadOpCodeForConstantValue(ILGenerator gen, object value) - { - if (value is string) - { - gen.Emit(OpCodes.Ldstr, value.ToString()); - } - else if (value is Int32) - { - var code = LdcOpCodesDictionary.Instance[value.GetType()]; - gen.Emit(code, (int)value); - } - else if (value is bool) - { - var code = LdcOpCodesDictionary.Instance[value.GetType()]; - gen.Emit(code, Convert.ToInt32(value)); - } - else - { - throw new NotSupportedException(); - } - } - /// /// Emits a load opcode of the appropriate kind for the constant default value of a /// type, such as 0 for value types and null for reference types.