using System; namespace StardewModdingAPI { /// Provides an API for accessing private game code. public interface IReflectionHelper : IModLinked { /********* ** Public methods *********/ /// Get a private instance field. /// The field type. /// The object which has the field. /// The field name. /// Whether to throw an exception if the private field is not found. IPrivateField GetPrivateField(object obj, string name, bool required = true); /// Get a private static field. /// The field type. /// The type which has the field. /// The field name. /// 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. /// The field name. /// Whether to throw an exception if the private field is not found. /// This is a shortcut for followed by . TValue GetPrivateValue(object obj, string name, bool required = true); /// Get the value of a private static field. /// The field type. /// The type which has the field. /// The field name. /// Whether to throw an exception if the private field is not found. /// This is a shortcut for followed by . TValue GetPrivateValue(Type type, string name, bool required = true); /// Get a private instance method. /// The object which has the method. /// The field name. /// Whether to throw an exception if the private field is not found. IPrivateMethod GetPrivateMethod(object obj, string name, bool required = true); /// Get a private static method. /// The type which has the method. /// The field name. /// Whether to throw an exception if the private field is not found. IPrivateMethod GetPrivateMethod(Type type, string name, bool required = true); } }