diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-02-07 21:07:57 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-02-07 21:07:57 -0500 |
commit | 8efa5f32c1721a1ee60f3783022453c1dfb69d91 (patch) | |
tree | b01de092f8f3d741b802f9ea0b85c840b38e3b20 /src/StardewModdingAPI/IReflectionHelper.cs | |
parent | cec74697866da2d67a62c3a4ef10d605592e4152 (diff) | |
download | SMAPI-8efa5f32c1721a1ee60f3783022453c1dfb69d91.tar.gz SMAPI-8efa5f32c1721a1ee60f3783022453c1dfb69d91.tar.bz2 SMAPI-8efa5f32c1721a1ee60f3783022453c1dfb69d91.zip |
add reflectionHelper.GetPrivateProperty<T> (#231)
Diffstat (limited to 'src/StardewModdingAPI/IReflectionHelper.cs')
-rw-r--r-- | src/StardewModdingAPI/IReflectionHelper.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/IReflectionHelper.cs b/src/StardewModdingAPI/IReflectionHelper.cs index 5d747eda..77943c6c 100644 --- a/src/StardewModdingAPI/IReflectionHelper.cs +++ b/src/StardewModdingAPI/IReflectionHelper.cs @@ -22,6 +22,20 @@ namespace StardewModdingAPI /// <param name="required">Whether to throw an exception if the private field is not found.</param> IPrivateField<TValue> GetPrivateField<TValue>(Type type, string name, bool required = true); + /// <summary>Get a private instance property.</summary> + /// <typeparam name="TValue">The property type.</typeparam> + /// <param name="obj">The object which has the property.</param> + /// <param name="name">The property name.</param> + /// <param name="required">Whether to throw an exception if the private property is not found.</param> + IPrivateProperty<TValue> GetPrivateProperty<TValue>(object obj, string name, bool required = true); + + /// <summary>Get a private static property.</summary> + /// <typeparam name="TValue">The property type.</typeparam> + /// <param name="type">The type which has the property.</param> + /// <param name="name">The property name.</param> + /// <param name="required">Whether to throw an exception if the private property is not found.</param> + IPrivateProperty<TValue> GetPrivateProperty<TValue>(Type type, string name, bool required = true); + /// <summary>Get the value of a private instance field.</summary> /// <typeparam name="TValue">The field type.</typeparam> /// <param name="obj">The object which has the field.</param> |