using System; namespace StardewModdingAPI { /// Provides an API for accessing inaccessible code. public interface IReflectionHelper : IModLinked { /********* ** Public methods *********/ /// Get an instance field. /// The field type. /// The object which has the field. /// The field name. /// Whether to throw an exception if the field is not found. IReflectedField GetField(object obj, string name, bool required = true); /// Get a static field. /// The field type. /// The type which has the field. /// The field name. /// Whether to throw an exception if the field is not found. IReflectedField GetField(Type type, string name, bool required = true); /// Get an instance property. /// The property type. /// The object which has the property. /// The property name. /// Whether to throw an exception if the property is not found. IReflectedProperty GetProperty(object obj, string name, bool required = true); /// Get a static property. /// The property type. /// The type which has the property. /// The property name. /// Whether to throw an exception if the property is not found. IReflectedProperty GetProperty(Type type, string name, bool required = true); /// Get an instance method. /// The object which has the method. /// The field name. /// Whether to throw an exception if the field is not found. IReflectedMethod GetMethod(object obj, string name, bool required = true); /// Get a static method. /// The type which has the method. /// The field name. /// Whether to throw an exception if the field is not found. IReflectedMethod GetMethod(Type type, string name, bool required = true); } }