public override void LongRunningCalc() { var l = BusinessRules.Calculate(); View.Print(MessageFor("synchronously", l)); }
private async Task LongRunningCalcAsync(Action <long> callback) { var l = await Task.Run(() => BusinessRules.Calculate()); callback(l); }
private static async Task <long> CalculateAsync() { return(await Task.Run(() => BusinessRules.Calculate())); }
public override void LongRunningCalc() => Task.Run(() => Print(BusinessRules.Calculate()));