uses `proxy.Name` instead of `target.Name` (which makes more sense in this context)

This commit is contained in:
Shockah 2022-02-08 22:36:34 +01:00
parent 5b5304403b
commit 5a92b0cd35
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ namespace StardewModdingAPI.Framework.Reflection
/// <param name="instanceField">The proxy field containing the API instance.</param>
private void ProxyMethod(TypeBuilder proxyBuilder, MethodInfo proxy, MethodInfo target, FieldBuilder instanceField)
{
MethodBuilder methodBuilder = proxyBuilder.DefineMethod(target.Name, MethodAttributes.Public | MethodAttributes.Final | MethodAttributes.Virtual);
MethodBuilder methodBuilder = proxyBuilder.DefineMethod(proxy.Name, MethodAttributes.Public | MethodAttributes.Final | MethodAttributes.Virtual);
// set up generic arguments
Type[] proxyGenericArguments = proxy.GetGenericArguments();