public static async Task <EgsDoseObject> LoadEgsObjectAsync(string file, IProgress <double> progress) { var loader = new EgsDoseLoader(); var dose = new EgsDoseObject(); loader.Load(file, dose, progress); return(dose); }
#pragma warning disable CS1998 // This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. public static async Task <EgsDoseObject> LoadEgsObjectAsync(string file, IProgress <double> progress) #pragma warning restore CS1998 // This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. { var loader = new EgsDoseLoader(); var dose = new EgsDoseObject(); loader.Load(file, dose, progress); return(dose); }