ExecuteAsync() публичный Метод

public ExecuteAsync ( FeedMirrorRequest request, ILogger logger, CancellationToken token ) : Task
request FeedMirrorRequest
logger ILogger
token System.Threading.CancellationToken
Результат Task
Пример #1
0
        private static async Task ExecuteAsync(FeedMirrorRequest request, CancellationToken token)
        {
            request.PackagesDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
            Directory.CreateDirectory(request.PackagesDirectory);

            try
            {
                var logger = new ConsoleLogger();

                var command = new FeedMirrorCommand();
                await command.ExecuteAsync(request, logger, token);
            }
            finally
            {
                Directory.Delete(request.PackagesDirectory, recursive: true);
            }
        }
Пример #2
0
        private static async Task ExecuteAsync(FeedMirrorRequest request, CancellationToken token)
        {
            request.PackagesDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
            Directory.CreateDirectory(request.PackagesDirectory);

            try
            {
                var logger = new ConsoleLogger();

                var command = new FeedMirrorCommand();
                await command.ExecuteAsync(request, logger, token);
            }
            finally
            {
                Directory.Delete(request.PackagesDirectory, recursive: true);
            }
        }