summaryrefslogtreecommitdiff
path: root/src/SMAPI/IPrivateMethod.cs
blob: b2fdaaeb070e493529db173cdfbc34d7092ae43a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
using System.Reflection;

namespace StardewModdingAPI
{
    /// <summary>A private method obtained through reflection.</summary>
    [Obsolete("Use " + nameof(IReflectedMethod) + " instead")]
    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);
    }
}