From 0a69cb4bf71e6e822e595141ce5f24009e509246 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 16 Apr 2022 19:15:50 -0400 Subject: allow switching between Pintail & original API proxying --- .../Framework/Reflection/IInterfaceProxyFactory.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/SMAPI/Framework/Reflection/IInterfaceProxyFactory.cs (limited to 'src/SMAPI/Framework/Reflection/IInterfaceProxyFactory.cs') diff --git a/src/SMAPI/Framework/Reflection/IInterfaceProxyFactory.cs b/src/SMAPI/Framework/Reflection/IInterfaceProxyFactory.cs new file mode 100644 index 00000000..6429db58 --- /dev/null +++ b/src/SMAPI/Framework/Reflection/IInterfaceProxyFactory.cs @@ -0,0 +1,17 @@ +namespace StardewModdingAPI.Framework.Reflection +{ + /// Generates proxy classes to access mod APIs through an arbitrary interface. + internal interface IInterfaceProxyFactory + { + /********* + ** Methods + *********/ + /// Create an API proxy. + /// The interface through which to access the API. + /// The API instance to access. + /// The unique ID of the mod consuming the API. + /// The unique ID of the mod providing the API. + TInterface CreateProxy(object instance, string sourceModID, string targetModID) + where TInterface : class; + } +} -- cgit