Remove ext. tool attributes which were deprecated in 2.9
This commit is contained in:
parent
415f0cc98c
commit
64a6700cc7
|
@ -55,33 +55,6 @@ namespace BizHawk.Client.Common
|
||||||
=> sysID != _sysID || !_romHashes.Contains(romHash);
|
=> sysID != _sysID || !_romHashes.Contains(romHash);
|
||||||
}
|
}
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Class)]
|
|
||||||
[Obsolete("renamed RomWhitelist-->RomList")]
|
|
||||||
public sealed class RomWhitelist : ExternalToolApplicabilityAttributeBase
|
|
||||||
{
|
|
||||||
private readonly IList<string> _romHashes;
|
|
||||||
|
|
||||||
private readonly string _sysID;
|
|
||||||
|
|
||||||
[Obsolete("replace CoreSystem with string from VSystemID.Raw")]
|
|
||||||
public RomWhitelist(CoreSystem system, params string[] romHashes)
|
|
||||||
: this(SystemIdConverter.ConvertBack(system), romHashes) {}
|
|
||||||
|
|
||||||
public RomWhitelist(string sysID, params string[] romHashes)
|
|
||||||
{
|
|
||||||
if (sysID is VSystemID.Raw.NULL) throw new ArgumentException("there are no roms for the NULL system", nameof(sysID));
|
|
||||||
if (!romHashes.All(NumericStringExtensions.IsHex)) throw new ArgumentException("misformatted hash", nameof(romHashes));
|
|
||||||
_romHashes = romHashes.ToList();
|
|
||||||
_sysID = sysID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool NotApplicableTo(string sysID)
|
|
||||||
=> sysID != _sysID;
|
|
||||||
|
|
||||||
public override bool NotApplicableTo(string romHash, string? sysID)
|
|
||||||
=> sysID != _sysID || !_romHashes.Contains(romHash);
|
|
||||||
}
|
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Class)]
|
[AttributeUsage(AttributeTargets.Class)]
|
||||||
public sealed class SingleRom : ExternalToolApplicabilityAttributeBase
|
public sealed class SingleRom : ExternalToolApplicabilityAttributeBase
|
||||||
{
|
{
|
||||||
|
@ -89,10 +62,6 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
private readonly string _sysID;
|
private readonly string _sysID;
|
||||||
|
|
||||||
[Obsolete("replace CoreSystem with string from VSystemID.Raw")]
|
|
||||||
public SingleRom(CoreSystem system, string romHash)
|
|
||||||
: this(SystemIdConverter.ConvertBack(system), romHash) {}
|
|
||||||
|
|
||||||
public SingleRom(string sysID, string romHash)
|
public SingleRom(string sysID, string romHash)
|
||||||
{
|
{
|
||||||
if (sysID is VSystemID.Raw.NULL) throw new ArgumentException("there are no roms for the NULL system", nameof(sysID));
|
if (sysID is VSystemID.Raw.NULL) throw new ArgumentException("there are no roms for the NULL system", nameof(sysID));
|
||||||
|
@ -113,10 +82,6 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
private readonly string _sysID;
|
private readonly string _sysID;
|
||||||
|
|
||||||
[Obsolete("replace CoreSystem with string from VSystemID.Raw")]
|
|
||||||
public SingleSystem(CoreSystem system)
|
|
||||||
: this(SystemIdConverter.ConvertBack(system)) {}
|
|
||||||
|
|
||||||
public SingleSystem(string sysID)
|
public SingleSystem(string sysID)
|
||||||
=> _sysID = sysID;
|
=> _sysID = sysID;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue