Ejemplo n.º 1
0
        public override void LongRunningCalc()
        {
            var l = BusinessRules.Calculate();

            View.Print(MessageFor("synchronously", l));
        }
Ejemplo n.º 2
0
        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()));