diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-02-17 18:43:19 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-02-17 18:43:19 -0500 |
commit | 84330e86809dff4a3e70c3cbd59f0373f7017799 (patch) | |
tree | 7aabc7f3f4d08189e197d298a98529b37f9b2a21 /src/SMAPI/Framework/ModHelpers | |
parent | e64326f9fe5a388e3a0638567bf4bdf8aab4b639 (diff) | |
download | SMAPI-84330e86809dff4a3e70c3cbd59f0373f7017799.tar.gz SMAPI-84330e86809dff4a3e70c3cbd59f0373f7017799.tar.bz2 SMAPI-84330e86809dff4a3e70c3cbd59f0373f7017799.zip |
split proxy builder & factory (#435)
Diffstat (limited to 'src/SMAPI/Framework/ModHelpers')
-rw-r--r-- | src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs b/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs index ea0dbb38..e579a830 100644 --- a/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs +++ b/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs @@ -20,7 +20,7 @@ namespace StardewModdingAPI.Framework.ModHelpers private readonly HashSet<string> AccessedModApis = new HashSet<string>(); /// <summary>Generates proxy classes to access mod APIs through an arbitrary interface.</summary> - private readonly InterfaceProxyBuilder ProxyBuilder; + private readonly InterfaceProxyFactory ProxyFactory; /********* @@ -29,13 +29,13 @@ namespace StardewModdingAPI.Framework.ModHelpers /// <summary>Construct an instance.</summary> /// <param name="modID">The unique ID of the relevant mod.</param> /// <param name="registry">The underlying mod registry.</param> - /// <param name="proxyBuilder">Generates proxy classes to access mod APIs through an arbitrary interface.</param> + /// <param name="proxyFactory">Generates proxy classes to access mod APIs through an arbitrary interface.</param> /// <param name="monitor">Encapsulates monitoring and logging for the mod.</param> - public ModRegistryHelper(string modID, ModRegistry registry, InterfaceProxyBuilder proxyBuilder, IMonitor monitor) + public ModRegistryHelper(string modID, ModRegistry registry, InterfaceProxyFactory proxyFactory, IMonitor monitor) : base(modID) { this.Registry = registry; - this.ProxyBuilder = proxyBuilder; + this.ProxyFactory = proxyFactory; this.Monitor = monitor; } @@ -99,7 +99,7 @@ namespace StardewModdingAPI.Framework.ModHelpers // get API of type if (api is TInterface castApi) return castApi; - return this.ProxyBuilder.CreateProxy<TInterface>(api, this.ModID, uniqueID); + return this.ProxyFactory.CreateProxy<TInterface>(api, this.ModID, uniqueID); } } } |