2016-12-12 15:00:58 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Emulation.Common
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Should be added to any field of an IEmulatorService 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>
|
2017-07-12 19:40:10 +00:00
|
|
|
|
public class FeatureNotImplementedAttribute : Attribute
|
2017-04-14 17:28:23 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
2016-12-12 15:00:58 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Should be added to any implementation of IEmulator to document any
|
|
|
|
|
/// IEmulatorService (that is not an ISpecializedEmulatorService) that
|
|
|
|
|
/// by design, will not be implemented by the core
|
|
|
|
|
/// Any service that is unimplemented and not marked with this attribute is
|
|
|
|
|
/// assumed to be a "TODO" that needs to be done but hasn't been done yet
|
|
|
|
|
/// </summary>
|
|
|
|
|
[AttributeUsage(AttributeTargets.Class)]
|
2017-07-12 19:40:10 +00:00
|
|
|
|
public class ServiceNotApplicableAttribute : Attribute
|
2016-12-12 15:00:58 +00:00
|
|
|
|
{
|
2017-07-12 19:40:10 +00:00
|
|
|
|
public ServiceNotApplicableAttribute(params Type[] types)
|
2016-12-12 15:00:58 +00:00
|
|
|
|
{
|
2019-10-13 15:50:57 +00:00
|
|
|
|
NotApplicableTypes = types?.AsEnumerable() ?? Enumerable.Empty<Type>();
|
2016-12-12 15:00:58 +00:00
|
|
|
|
}
|
|
|
|
|
|
2019-10-29 18:59:08 +00:00
|
|
|
|
public IEnumerable<Type> NotApplicableTypes { get; }
|
2016-12-12 15:00:58 +00:00
|
|
|
|
}
|
|
|
|
|
}
|