tmp
Some checks failed
Main Build Process / Build & Test (pull_request) Failing after 1m15s

This commit is contained in:
2026-02-23 22:58:44 +01:00
parent 5ef3be8cc8
commit c2b9d0b3c2
22 changed files with 245 additions and 71 deletions

View File

@@ -48,21 +48,33 @@ public class WasmStaticDataGetter : IStaticDataGetter
}
/// <inheritdoc/>
public ICollection<Building> GetBuildings()
public async Task<ICollection<Building>> GetBuildingsAsync()
{
InitializeAsync().GetAwaiter().GetResult();
List<Building> buildings = JsonSerializer.Deserialize<List<Building>>(_buildingData)
await InitializeAsync();
List<Building> buildings = JsonSerializer.Deserialize<List<Building>>(_buildingData)
?? throw new JsonException("Cannot deserialize Buildings");
return buildings;
}
/// <inheritdoc/>
public ICollection<Building> GetBuildings()
{
throw new NotImplementedException("Use the asynchronous version of GetBuildings for WebAssembly.");
}
/// <inheritdoc/>
public ICollection<Objective> GetObjectives()
{
InitializeAsync().GetAwaiter().GetResult();
List<Objective> objectives = JsonSerializer.Deserialize<List<Objective>>(_objectivesData)
throw new NotImplementedException("Use the asynchronous version of GetObjectives for WebAssembly.");
}
/// <inheritdoc/>
public async Task<ICollection<Objective>> GetObjectivesAsync()
{
await InitializeAsync();
List<Objective> objectives = JsonSerializer.Deserialize<List<Objective>>(_objectivesData)
?? throw new JsonException("Cannot deserialize Objectives");
return objectives;
}