From 516933aab58eb668d8db20307cd25d6532bd198c Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Fri, 11 Oct 2019 18:22:29 +0200 Subject: [PATCH] Move to netcore3.0 --- Emby.Naming/Emby.Naming.csproj | 2 +- Emby.Naming/Extensions/StringExtensions.cs | 31 ------------------- Emby.Naming/TV/SeasonPathParser.cs | 2 -- .../Data/SqliteExtensions.cs | 3 +- .../Emby.Server.Implementations.csproj | 2 +- Jellyfin.Server/Jellyfin.Server.csproj | 2 +- .../Jellyfin.Common.Tests.csproj | 4 +-- .../Jellyfin.MediaEncoding.Tests.csproj | 4 +-- 8 files changed, 8 insertions(+), 42 deletions(-) delete mode 100644 Emby.Naming/Extensions/StringExtensions.cs diff --git a/Emby.Naming/Emby.Naming.csproj b/Emby.Naming/Emby.Naming.csproj index 0b1ce2fce6..fca0aa1b38 100644 --- a/Emby.Naming/Emby.Naming.csproj +++ b/Emby.Naming/Emby.Naming.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.1 false diff --git a/Emby.Naming/Extensions/StringExtensions.cs b/Emby.Naming/Extensions/StringExtensions.cs deleted file mode 100644 index 5512127a80..0000000000 --- a/Emby.Naming/Extensions/StringExtensions.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Text; - -namespace Emby.Naming.Extensions -{ - public static class StringExtensions - { - // TODO: @bond remove this when moving to netstandard2.1 - public static string Replace(this string str, string oldValue, string newValue, StringComparison comparison) - { - var sb = new StringBuilder(); - - var previousIndex = 0; - var index = str.IndexOf(oldValue, comparison); - - while (index != -1) - { - sb.Append(str.Substring(previousIndex, index - previousIndex)); - sb.Append(newValue); - index += oldValue.Length; - - previousIndex = index; - index = str.IndexOf(oldValue, index, comparison); - } - - sb.Append(str.Substring(previousIndex)); - - return sb.ToString(); - } - } -} diff --git a/Emby.Naming/TV/SeasonPathParser.cs b/Emby.Naming/TV/SeasonPathParser.cs index e81b2bb349..9096ccaf5d 100644 --- a/Emby.Naming/TV/SeasonPathParser.cs +++ b/Emby.Naming/TV/SeasonPathParser.cs @@ -2,8 +2,6 @@ using System; using System.Globalization; using System.IO; using System.Linq; -using Emby.Naming.Common; -using Emby.Naming.Extensions; namespace Emby.Naming.TV { diff --git a/Emby.Server.Implementations/Data/SqliteExtensions.cs b/Emby.Server.Implementations/Data/SqliteExtensions.cs index 0fb2c10fd3..e7c394b548 100644 --- a/Emby.Server.Implementations/Data/SqliteExtensions.cs +++ b/Emby.Server.Implementations/Data/SqliteExtensions.cs @@ -34,8 +34,7 @@ namespace Emby.Server.Implementations.Data public static Guid ReadGuidFromBlob(this IResultSetValue result) { - // TODO: Remove ToArray when upgrading to netstandard2.1 - return new Guid(result.ToBlob().ToArray()); + return new Guid(result.ToBlob()); } public static string ToDateTimeParamValue(this DateTime dateValue) diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 2c71f04578..ea44442687 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -42,7 +42,7 @@ - netstandard2.0 + netstandard2.1 false true diff --git a/Jellyfin.Server/Jellyfin.Server.csproj b/Jellyfin.Server/Jellyfin.Server.csproj index fa3e9cb35d..efdb75f980 100644 --- a/Jellyfin.Server/Jellyfin.Server.csproj +++ b/Jellyfin.Server/Jellyfin.Server.csproj @@ -3,7 +3,7 @@ jellyfin Exe - netcoreapp2.1 + netcoreapp3.0 false true diff --git a/tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj b/tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj index 9188b8a02d..bb40985a49 100644 --- a/tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj +++ b/tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj @@ -1,12 +1,12 @@ - netcoreapp2.2 + netcoreapp3.0 false - + diff --git a/tests/Jellyfin.MediaEncoding.Tests/Jellyfin.MediaEncoding.Tests.csproj b/tests/Jellyfin.MediaEncoding.Tests/Jellyfin.MediaEncoding.Tests.csproj index 9213484fef..70e2d18516 100644 --- a/tests/Jellyfin.MediaEncoding.Tests/Jellyfin.MediaEncoding.Tests.csproj +++ b/tests/Jellyfin.MediaEncoding.Tests/Jellyfin.MediaEncoding.Tests.csproj @@ -1,12 +1,12 @@ - netcoreapp2.2 + netcoreapp3.0 false - +