diff options
author | Shockah <me@shockah.pl> | 2022-02-10 11:43:35 +0100 |
---|---|---|
committer | Shockah <me@shockah.pl> | 2022-02-10 11:43:35 +0100 |
commit | 07259452170a253c44d5c2be68fc2342a88d2504 (patch) | |
tree | bb8b4c634db71f5b1f5c7e14539c58954aed9356 /src/SMAPI/Framework/Reflection/InterfaceProxyFactory.cs | |
parent | 61415e41eb8f5f61e8b241255162257191c0a766 (diff) | |
download | SMAPI-07259452170a253c44d5c2be68fc2342a88d2504.tar.gz SMAPI-07259452170a253c44d5c2be68fc2342a88d2504.tar.bz2 SMAPI-07259452170a253c44d5c2be68fc2342a88d2504.zip |
add proxy instance caching
Diffstat (limited to 'src/SMAPI/Framework/Reflection/InterfaceProxyFactory.cs')
-rw-r--r-- | src/SMAPI/Framework/Reflection/InterfaceProxyFactory.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/Reflection/InterfaceProxyFactory.cs b/src/SMAPI/Framework/Reflection/InterfaceProxyFactory.cs index 72b4254c..daeac2ad 100644 --- a/src/SMAPI/Framework/Reflection/InterfaceProxyFactory.cs +++ b/src/SMAPI/Framework/Reflection/InterfaceProxyFactory.cs @@ -42,7 +42,7 @@ namespace StardewModdingAPI.Framework.Reflection // create instance InterfaceProxyBuilder builder = this.ObtainBuilder(instance.GetType(), typeof(TInterface), sourceModID, targetModID); - return (TInterface)builder.CreateInstance(instance, this); + return (TInterface)builder.ObtainInstance(instance, this); } internal InterfaceProxyBuilder ObtainBuilder(Type targetType, Type interfaceType, string sourceModID, string targetModID) |