summaryrefslogtreecommitdiff
path: root/src/SMAPI/IReflectedMethod.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-12-10 18:05:18 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-12-10 18:05:18 -0500
commit8776d1afa6dce054f3bc7cb421c86f3e2fe06ab3 (patch)
tree506b4f8487aaba8f5ea5e3e94795308b82a0a7ca /src/SMAPI/IReflectedMethod.cs
parent80c4d93559989777fbe5a23b923155b93df7a715 (diff)
downloadSMAPI-8776d1afa6dce054f3bc7cb421c86f3e2fe06ab3.tar.gz
SMAPI-8776d1afa6dce054f3bc7cb421c86f3e2fe06ab3.tar.bz2
SMAPI-8776d1afa6dce054f3bc7cb421c86f3e2fe06ab3.zip
adjust reflection API to correctly reflect what it does (#410)
Diffstat (limited to 'src/SMAPI/IReflectedMethod.cs')
-rw-r--r--src/SMAPI/IReflectedMethod.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/SMAPI/IReflectedMethod.cs b/src/SMAPI/IReflectedMethod.cs
new file mode 100644
index 00000000..de83b98c
--- /dev/null
+++ b/src/SMAPI/IReflectedMethod.cs
@@ -0,0 +1,27 @@
+using System.Reflection;
+
+namespace StardewModdingAPI
+{
+ /// <summary>A method obtained through reflection.</summary>
+ public interface IReflectedMethod
+ {
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The reflection metadata.</summary>
+ MethodInfo MethodInfo { get; }
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Invoke the method.</summary>
+ /// <typeparam name="TValue">The return type.</typeparam>
+ /// <param name="arguments">The method arguments to pass in.</param>
+ TValue Invoke<TValue>(params object[] arguments);
+
+ /// <summary>Invoke the method.</summary>
+ /// <param name="arguments">The method arguments to pass in.</param>
+ void Invoke(params object[] arguments);
+ }
+} \ No newline at end of file