diff --git a/Onova.Tests/Onova.Tests.csproj b/Onova.Tests/Onova.Tests.csproj index 9f902d4..72e4b18 100644 --- a/Onova.Tests/Onova.Tests.csproj +++ b/Onova.Tests/Onova.Tests.csproj @@ -5,14 +5,14 @@ - + - - + + - + diff --git a/Onova.Updater/Onova.Updater.csproj b/Onova.Updater/Onova.Updater.csproj index 22b317e..0937a10 100644 --- a/Onova.Updater/Onova.Updater.csproj +++ b/Onova.Updater/Onova.Updater.csproj @@ -8,7 +8,7 @@ - + \ No newline at end of file diff --git a/Onova.Updater/Utils/Extensions/DisposableExtensions.cs b/Onova.Updater/Utils/Extensions/DisposableExtensions.cs index a79c601..afe1e10 100644 --- a/Onova.Updater/Utils/Extensions/DisposableExtensions.cs +++ b/Onova.Updater/Utils/Extensions/DisposableExtensions.cs @@ -25,9 +25,7 @@ public static void DisposeAll(this IEnumerable disposables) if (exceptions?.Any() == true) { - // TODO: No aggregate exception on .NET 3.5 - // throw new AggregateException(exceptions); - throw new Exception("An error occurred while disposing of one or more objects.", exceptions.First()); + throw new AggregateException(exceptions); } } } \ No newline at end of file diff --git a/Onova.Updater/Utils/Extensions/StreamExtensions.cs b/Onova.Updater/Utils/Extensions/StreamExtensions.cs deleted file mode 100644 index 732ede4..0000000 --- a/Onova.Updater/Utils/Extensions/StreamExtensions.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.IO; - -namespace Onova.Updater.Utils.Extensions; - -internal static class StreamExtensions -{ - // TODO: replace by a polyfill - public static void CopyTo(this Stream source, Stream destination) - { - var buffer = new byte[16 * 1024]; - int read; - - while ((read = source.Read(buffer, 0, buffer.Length)) > 0) - destination.Write(buffer, 0, read); - } -} \ No newline at end of file diff --git a/Onova/Onova.csproj b/Onova/Onova.csproj index b56f094..6aa8fca 100644 --- a/Onova/Onova.csproj +++ b/Onova/Onova.csproj @@ -27,7 +27,7 @@ - +