From 9696967329645c4f51a3a10d4f0ddc27167ab67e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Luthi?= Date: Wed, 10 Feb 2021 21:12:14 +0100 Subject: [PATCH] Remove references to System.Text.Encoding.CodePages This was introduced in d0481de8141016a03c7d58403633cedc01cf907f (port for .NET Core) but is actually not required for ShellProgressBar to work. --- src/ShellProgressBar.Example/Program.cs | 2 -- src/ShellProgressBar/ProgressBarBase.cs | 6 ------ src/ShellProgressBar/ShellProgressBar.csproj | 1 - 3 files changed, 9 deletions(-) diff --git a/src/ShellProgressBar.Example/Program.cs b/src/ShellProgressBar.Example/Program.cs index e3f342d..9845ed8 100644 --- a/src/ShellProgressBar.Example/Program.cs +++ b/src/ShellProgressBar.Example/Program.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Text; using System.Threading; using System.Threading.Tasks; using ShellProgressBar.Example.Examples; @@ -46,7 +45,6 @@ class Program static void Main(string[] args) { - Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); var cts = new CancellationTokenSource(); Console.CancelKeyPress += (s, e) => { diff --git a/src/ShellProgressBar/ProgressBarBase.cs b/src/ShellProgressBar/ProgressBarBase.cs index 5b9f56b..3e22e3c 100644 --- a/src/ShellProgressBar/ProgressBarBase.cs +++ b/src/ShellProgressBar/ProgressBarBase.cs @@ -1,17 +1,11 @@ using System; using System.Collections.Concurrent; -using System.Text; using System.Threading; namespace ShellProgressBar { public abstract class ProgressBarBase { - static ProgressBarBase() - { - Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); - } - protected readonly DateTime _startDate = DateTime.Now; private int _maxTicks; private int _currentTick; diff --git a/src/ShellProgressBar/ShellProgressBar.csproj b/src/ShellProgressBar/ShellProgressBar.csproj index 9b88212..03dc99f 100644 --- a/src/ShellProgressBar/ShellProgressBar.csproj +++ b/src/ShellProgressBar/ShellProgressBar.csproj @@ -21,6 +21,5 @@ runtime; build; native; contentfiles; analyzers; buildtransitive -