summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Reflection/IPrivateMethod.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2016-12-09 12:25:53 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2016-12-09 12:25:53 -0500
commitcd0e5961d454e5861e2fd760388eb6920a1e2257 (patch)
treece7a206ba9992dfa07f78db46828e0f17f32f96d /src/StardewModdingAPI/Reflection/IPrivateMethod.cs
parent25d2eb477729e929f3534b6f828c3fd96632e107 (diff)
downloadSMAPI-cd0e5961d454e5861e2fd760388eb6920a1e2257.tar.gz
SMAPI-cd0e5961d454e5861e2fd760388eb6920a1e2257.tar.bz2
SMAPI-cd0e5961d454e5861e2fd760388eb6920a1e2257.zip
add reflection API for mods (#185)
Diffstat (limited to 'src/StardewModdingAPI/Reflection/IPrivateMethod.cs')
-rw-r--r--src/StardewModdingAPI/Reflection/IPrivateMethod.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Reflection/IPrivateMethod.cs b/src/StardewModdingAPI/Reflection/IPrivateMethod.cs
new file mode 100644
index 00000000..4790303b
--- /dev/null
+++ b/src/StardewModdingAPI/Reflection/IPrivateMethod.cs
@@ -0,0 +1,27 @@
+using System.Reflection;
+
+namespace StardewModdingAPI.Reflection
+{
+ /// <summary>A private method obtained through reflection.</summary>
+ public interface IPrivateMethod
+ {
+ /*********
+ ** 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