diff --git a/SexyProxy/Emit/EmitProxyTypeFactory.cs b/SexyProxy/Emit/EmitProxyTypeFactory.cs index 782e897..565eeed 100644 --- a/SexyProxy/Emit/EmitProxyTypeFactory.cs +++ b/SexyProxy/Emit/EmitProxyTypeFactory.cs @@ -235,7 +235,7 @@ public Type CreateProxyType(Type sourceType) il.Emit(OpCodes.Ldsfld, propertyInfoField); // Load the PropertyInfo onto the stack il.Emit(OpCodes.Call, invocationHandlerIsHandlerActive); // Call InvocationHandler.IsHandlerActive and leave the bool result on the stack il.Emit(OpCodes.Brtrue, notOptedOut); // If they didn't opt out (returned true), jump to the normal interception logic below - ImplementOptOut(il, methodInfo, proceedCall, isIntf, target); // They opted out, so do an implicit (and efficient) equivalent of proceed + ImplementOptOut(il, methodInfo, proceedCall, target); // They opted out, so do an implicit (and efficient) equivalent of proceed il.MarkLabel(notOptedOut); // Load handler @@ -294,7 +294,7 @@ public Type CreateProxyType(Type sourceType) return proxyType; } - private void ImplementOptOut(ILGenerator il, MethodInfo methodInfo, OpCode proceedCall, bool isIntf, FieldBuilder target) + private void ImplementOptOut(ILGenerator il, MethodInfo methodInfo, OpCode proceedCall, FieldBuilder target) { var parameterInfos = methodInfo.GetParameters();