InfinityQSV2
This commit is contained in:
@ -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));
|
||||
|
Reference in New Issue
Block a user