One should never have to reload anything when coded properly.
A do nothing example
using System.Diagnostics;
using System.Threading;
namespace AsyncSimple.Classes
{
public class SomeService
{
public int Calculate()
{
static void BusyWait(int milliseconds)
{
var sw = Stopwatch.StartNew();
while (sw.ElapsedMilliseconds < milliseconds)
{
Thread.SpinWait(1000);
}
}
// Tons of work to do in here!
for (int index = 0; index < 10; index++)
{
BusyWait(1000);
}
return 42;
}
}
}
Called and the form remains responsive, MessageBox is shown when done.
private async void FakeWorkButton_Click(object sender, EventArgs e)
{
var service = new SomeService();
await Task.Run(() => service.Calculate());
MessageBox.Show("Done");
}
Back to your code, unsure how you are reading json but seems if from a file should something like this.
public async Task SimpleReadAsync()
{
string filePath = "simple.txt";
string text = await File.ReadAllTextAsync(filePath);
}
Add in deserializing and that's it.