示例#1
0
        private async Task DownloadAndCompressDirectory(DirectoryInfo directory)
        {
            var logDirectory = new LogDirectory(directory);

            await DownloadDirectory(logDirectory);
            await CompressDirectory(directory);
        }
示例#2
0
        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");
        }
示例#3
0
        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");
        }
示例#4
0
        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();
            }
        }