Пример #1
0
        public async Task Run(string name, IEnumerable <Task> tasks)
        {
            var trip = new TripCounter(name, _logger);
            await Task.WhenAll(tasks);

            trip.Dispose();
        }
Пример #2
0
        public async Task Run(string name, Task task)
        {
            var   trip = new TripCounter(name, _logger);
            await task;

            trip.Dispose();
        }
Пример #3
0
        public async Task <T> Run <T>(string name, Task <T> task)
        {
            var trip   = new TripCounter(name, _logger);
            var result = await task;

            trip.Dispose();
            return(result);
        }