using System; using System.Collections.Generic; using BizHawk.Client.Common; namespace BizHawk.Client.ApiHawk { /// /// This interface defines the mechanism by which External tools can retrieve /// from a client implementation /// An implementation should collect all available IExternalApi instances. /// This interface defines only the external interaction. This interface does not specify the means /// by which a api provider will be populated with available apis. However, an implementation /// by design must provide this mechanism /// /// public interface IExternalApiProvider { /// e /// Returns whether or not T is available /// /// The to check bool HasApi() where T : IExternalApi; /// /// Returns whether or not t is available /// bool HasApi(Type t); /// /// Returns an instance of T if T is available /// Else returns null /// /// The requested T GetApi() where T : IExternalApi; /// /// Returns an instance of t if t is available /// Else returns null /// object GetApi(Type t); /// /// Gets a list of all currently registered Apis available to be retrieved /// IEnumerable AvailableApis { get; } } }