Skip to content

Commit

Permalink
Remove ext. tool attributes which were deprecated in 2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiRulz committed Jun 11, 2024
1 parent 415f0cc commit 64a6700
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions src/BizHawk.Client.Common/Api/ExternalToolAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,44 +55,13 @@ public override bool NotApplicableTo(string romHash, string? sysID)
=> 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)]
public sealed class SingleRom : ExternalToolApplicabilityAttributeBase
{
private readonly string _romHash;

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)
{
if (sysID is VSystemID.Raw.NULL) throw new ArgumentException("there are no roms for the NULL system", nameof(sysID));
Expand All @@ -113,10 +82,6 @@ public sealed class SingleSystem : ExternalToolApplicabilityAttributeBase
{
private readonly string _sysID;

[Obsolete("replace CoreSystem with string from VSystemID.Raw")]
public SingleSystem(CoreSystem system)
: this(SystemIdConverter.ConvertBack(system)) {}

public SingleSystem(string sysID)
=> _sysID = sysID;

Expand Down

0 comments on commit 64a6700

Please sign in to comment.