2014-11-24 00:38:29 +00:00
|
|
|
|
using System;
|
2014-11-30 23:41:54 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
2014-11-24 00:38:29 +00:00
|
|
|
|
|
|
|
|
|
namespace BizHawk.Emulation.Common
|
2014-11-23 20:30:53 +00:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This interface specifies that an interface or implementation is a emulator core service, such as IDebuggable,
|
|
|
|
|
/// but is an optional part of the core functionality
|
|
|
|
|
/// Clients should gracefully handle an IEmulator that has a missing or partial implementation of one of these services
|
|
|
|
|
/// </summary>
|
2014-12-04 02:12:57 +00:00
|
|
|
|
public interface IEmulatorService
|
2014-11-23 20:30:53 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
2014-11-24 00:38:29 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Should be added to any field of an ICoreService that is not implemented. By Convention it should also throw a NotImplementedException
|
|
|
|
|
/// Any feature that does not have this attribute is assumed to be implemented
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class FeatureNotImplemented : Attribute
|
|
|
|
|
{
|
|
|
|
|
public FeatureNotImplemented() { }
|
|
|
|
|
}
|
2014-11-30 23:41:54 +00:00
|
|
|
|
|
2014-12-13 02:31:31 +00:00
|
|
|
|
[AttributeUsage(AttributeTargets.Class)]
|
2014-11-30 23:41:54 +00:00
|
|
|
|
public class ServiceNotApplicable : Attribute
|
|
|
|
|
{
|
|
|
|
|
public ServiceNotApplicable(params Type[] types)
|
|
|
|
|
{
|
|
|
|
|
if (types != null)
|
|
|
|
|
{
|
|
|
|
|
NotApplicableTypes = types.ToList();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
NotApplicableTypes = new List<Type>();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IEnumerable<Type> NotApplicableTypes { get; private set; }
|
|
|
|
|
}
|
2014-11-23 20:30:53 +00:00
|
|
|
|
}
|