private async Task DownloadAndCompressDirectory(DirectoryInfo directory) { var logDirectory = new LogDirectory(directory); await DownloadDirectory(logDirectory); await CompressDirectory(directory); }
private async Task DownloadDirectory(LogDirectory logDirectory) { var downloadSize = await ExecuteTimedLongTask($"Début du téléchargement de {logDirectory.Name} ...", "Temps de téléchargement", logDirectory.Download); WriteLineToConsole($"Taille des fichiers téléchargés : {downloadSize / Mega} MB"); }
private async Task ShowAnalysisResult(ILogAnalysis analysis, LogDirectory logDirectory) { await ExecuteTimedLongTask($"Début [{analysis.Name}] dans {logDirectory.Name}...", "Temps de calcul", () => AnalyseDirectory(analysis)); WriteLineToConsole($"Taille totale des logs : {logDirectory.GetSize() / Mega} MB"); }
private async Task DownloadAndCompressDirectory() { if (LogDirectory.IsLogDirectory(SelectedDirectory)) { await DownloadAndCompressDirectory(SelectedDirectory); } foreach (var directory in SelectedDirectory.EnumerateDirectories("*", SearchOption.AllDirectories).Where(LogDirectory.IsLogDirectory)) { await DownloadAndCompressDirectory(directory); WriteLineToConsole(); } }