Remove `IGameInfoApi` which was deprecated in 2.9
This commit is contained in:
parent
6c27e89bc7
commit
155ea9ac79
|
@ -18,10 +18,6 @@ namespace BizHawk.Client.Common
|
|||
public IEmulationApi Emulation
|
||||
=> Get<IEmulationApi>(); // requires IEmulator
|
||||
|
||||
[Obsolete("use Emulation")]
|
||||
public IGameInfoApi GameInfo
|
||||
=> Get<IGameInfoApi>();
|
||||
|
||||
public IGuiApi Gui
|
||||
=> Get<IGuiApi>(); // requires IEmulator
|
||||
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Emulation.Common;
|
||||
|
||||
namespace BizHawk.Client.Common
|
||||
{
|
||||
[Obsolete("use IEmulationApi")]
|
||||
public sealed class GameInfoApi : IGameInfoApi
|
||||
{
|
||||
[OptionalService]
|
||||
public IBoardInfo? _boardInfo { get; set; }
|
||||
|
||||
private readonly IGameInfo? _game;
|
||||
|
||||
public GameInfoApi(IGameInfo? game)
|
||||
=> _game = game;
|
||||
|
||||
public string GetBoardType()
|
||||
=> _boardInfo?.BoardName ?? string.Empty;
|
||||
|
||||
public IGameInfo? GetGameInfo()
|
||||
=> _game;
|
||||
|
||||
public IReadOnlyDictionary<string, string?> GetOptions()
|
||||
{
|
||||
var options = new Dictionary<string, string?>();
|
||||
if (_game == null) return options;
|
||||
foreach (var (k, v) in ((GameInfo) _game).GetOptions()) options[k] = v;
|
||||
return options;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using BizHawk.Emulation.Common;
|
||||
|
||||
namespace BizHawk.Client.Common
|
||||
{
|
||||
[Obsolete("use IEmulationApi")]
|
||||
public interface IGameInfoApi : IExternalApi
|
||||
{
|
||||
string GetBoardType();
|
||||
|
||||
IGameInfo? GetGameInfo();
|
||||
|
||||
IReadOnlyDictionary<string, string?> GetOptions();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue