예제 #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
파일: Program.cs 프로젝트: NuGet/Entropy
        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);
            }
        }