mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
[tweaks and fixes]
reenable tekno support address vagrant thread issue refactor game log reader creation to follow better practices fix bot issues/address how guids are generated for bots/none provided
This commit is contained in:
16
Tests/ApplicationTests/Fixtures/DataFileLoader.cs
Normal file
16
Tests/ApplicationTests/Fixtures/DataFileLoader.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using IW4MAdmin.Application.Misc;
|
||||
using Newtonsoft.Json;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ApplicationTests.Fixtures
|
||||
{
|
||||
class DataFileLoader
|
||||
{
|
||||
public async Task<T> Load<T>(string fileName)
|
||||
{
|
||||
string data = await File.ReadAllTextAsync($"{fileName}.json");
|
||||
return JsonConvert.DeserializeObject<T>(data, EventLog.BuildVcrSerializationSettings());
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user