From b2a48d338a3d7c3aef8d29cb1ede24e1c9cb7391 Mon Sep 17 00:00:00 2001 From: Alexey Golub Date: Thu, 23 Apr 2020 00:30:37 +0300 Subject: [PATCH] Update nuget packages --- .../Commands/Base/ExportMultipleCommandBase.cs | 12 ++---------- .../DiscordChatExporter.Cli.csproj | 4 ++-- .../DiscordChatExporter.Domain.csproj | 2 +- .../DiscordChatExporter.Gui.csproj | 8 ++++---- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/DiscordChatExporter.Cli/Commands/Base/ExportMultipleCommandBase.cs b/DiscordChatExporter.Cli/Commands/Base/ExportMultipleCommandBase.cs index 51656a9..a830637 100644 --- a/DiscordChatExporter.Cli/Commands/Base/ExportMultipleCommandBase.cs +++ b/DiscordChatExporter.Cli/Commands/Base/ExportMultipleCommandBase.cs @@ -23,17 +23,10 @@ namespace DiscordChatExporter.Cli.Commands.Base // This uses a separate route from ExportCommandBase because the progress ticker is not thread-safe // Ugly code ahead. Will need to refactor. - // Progress console.Output.Write($"Exporting {channels.Count} channels... "); - var ticker = console.CreateProgressTicker(); + var progress = console.CreateProgressTicker(); - // TODO: refactor this after improving Gress - var progressManager = new ProgressManager(); - progressManager.PropertyChanged += (sender, args) => ticker.Report(progressManager.Progress); - - var operations = progressManager.CreateOperations(channels.Count); - - // Export channels + var operations = progress.Wrap().CreateOperations(channels.Count); var errors = new List(); @@ -62,7 +55,6 @@ namespace DiscordChatExporter.Cli.Commands.Base } }, ParallelLimit.ClampMin(1)); - ticker.Report(1); console.Output.WriteLine(); foreach (var error in errors) diff --git a/DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj b/DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj index 8973b4a..8cdc6c3 100644 --- a/DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj +++ b/DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/DiscordChatExporter.Domain/DiscordChatExporter.Domain.csproj b/DiscordChatExporter.Domain/DiscordChatExporter.Domain.csproj index efd3b46..19bb533 100644 --- a/DiscordChatExporter.Domain/DiscordChatExporter.Domain.csproj +++ b/DiscordChatExporter.Domain/DiscordChatExporter.Domain.csproj @@ -3,7 +3,7 @@ - + diff --git a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj index 9c6e9d7..721984b 100644 --- a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj +++ b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj @@ -13,16 +13,16 @@ - + - - + + - +