示例#1
0
        public async Task <long> CheckAwaitBehaviourWithAwaitAtTheEndWithSleep()
        {
            var watch = Stopwatch.StartNew();
            var task1 = _asyncService.WaitReturnString().ConfigureAwait(false);
            var task2 = _asyncService.WaitReturnString().ConfigureAwait(false);
            var task3 = _asyncService.WaitReturnString().ConfigureAwait(false);

            MockMethod(await task1, await task2, await task3);
            watch.Stop();
            return(watch.ElapsedMilliseconds);
        }