From 8efa5f32c1721a1ee60f3783022453c1dfb69d91 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 7 Feb 2017 21:07:57 -0500 Subject: add reflectionHelper.GetPrivateProperty (#231) --- src/StardewModdingAPI/IReflectionHelper.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/StardewModdingAPI/IReflectionHelper.cs') 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 /// Whether to throw an exception if the private field is not found. IPrivateField GetPrivateField(Type type, string name, bool required = true); + /// Get a private instance property. + /// The property type. + /// The object which has the property. + /// The property name. + /// Whether to throw an exception if the private property is not found. + IPrivateProperty GetPrivateProperty(object obj, string name, bool required = true); + + /// Get a private static property. + /// The property type. + /// The type which has the property. + /// The property name. + /// Whether to throw an exception if the private property is not found. + IPrivateProperty GetPrivateProperty(Type type, string name, bool required = true); + /// Get the value of a private instance field. /// The field type. /// The object which has the field. -- cgit