Beispiel #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);
            }
        }
Beispiel #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);
            }
        }