2014-12-13 21:54:59 +00:00
|
|
|
|
using System;
|
2015-01-14 22:53:08 +00:00
|
|
|
|
using System.Collections.Generic;
|
2014-12-15 21:35:09 +00:00
|
|
|
|
|
2014-12-13 21:54:59 +00:00
|
|
|
|
namespace BizHawk.Emulation.Common
|
2014-12-04 03:38:30 +00:00
|
|
|
|
{
|
|
|
|
|
public interface IEmulatorServiceProvider
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns whether or not T is available
|
|
|
|
|
/// </summary>
|
2015-01-23 20:55:13 +00:00
|
|
|
|
bool HasService<T>() where T : IEmulatorService;
|
2014-12-13 21:54:59 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns whether or not t is available
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool HasService(Type t);
|
2014-12-04 03:38:30 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns an instance of T if T is available
|
|
|
|
|
/// Else returns null
|
|
|
|
|
/// </summary>
|
2015-01-23 20:55:13 +00:00
|
|
|
|
T GetService<T>() where T : IEmulatorService;
|
2014-12-13 21:54:59 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns an instance of t if t is available
|
|
|
|
|
/// Else returns null
|
|
|
|
|
/// </summary>
|
2014-12-15 21:35:09 +00:00
|
|
|
|
object GetService(Type t);
|
2015-01-14 22:53:08 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A list of all cuurently registered services available to be called
|
|
|
|
|
/// </summary>
|
|
|
|
|
IEnumerable<Type> AvailableServices { get; }
|
2014-12-04 03:38:30 +00:00
|
|
|
|
}
|
|
|
|
|
}
|