InfinityQSV2

This commit is contained in:
2023-02-25 12:39:34 -07:00
parent 8e15b6a3a5
commit 97c9c3c264
59 changed files with 142046 additions and 2119 deletions

View File

@ -9,12 +9,14 @@ public class PinRepository : IPinRepository
private readonly string _MockRoot;
private readonly Serilog.ILogger _Log;
private readonly string _RepositoryName;
private readonly Dictionary<string, Dictionary<long, HeaderCommon>> _RdsToHeaderCommonCollection;
public PinRepository(string mockRoot)
{
_MockRoot = mockRoot;
_RdsToHeaderCommonCollection = new();
_RepositoryName = nameof(PinRepository)[..^10];
_Log = Serilog.Log.ForContext<PinRepository>();
}
@ -79,7 +81,7 @@ public class PinRepository : IPinRepository
Result<Pinned[]>? r;
if (!string.IsNullOrEmpty(_MockRoot))
{
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), "GetPinnedTableApi.json"));
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IPinRepository.GetPinnedTable)}.json"));
r = JsonSerializer.Deserialize<Result<Pinned[]>>(json);
if (r is null)
throw new NullReferenceException(nameof(r));