Ejemplo n.º 1
0
        private async Task DownloadAndCompressDirectory(DirectoryInfo directory)
        {
            var logDirectory = new LogDirectory(directory);

            await DownloadDirectory(logDirectory);
            await CompressDirectory(directory);
        }
Ejemplo n.º 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");
        }
Ejemplo n.º 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");
        }
Ejemplo n.º 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();
            }
        }