diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-10-11 18:22:29 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2019-10-11 18:32:13 +0200 |
| commit | 516933aab58eb668d8db20307cd25d6532bd198c (patch) | |
| tree | dcde956a2181777ab7fc97a23f6879750d22607c /Emby.Naming | |
| parent | d64b43286ecf9418280d5a782826182cc2ef98e4 (diff) | |
Move to netcore3.0
Diffstat (limited to 'Emby.Naming')
| -rw-r--r-- | Emby.Naming/Emby.Naming.csproj | 2 | ||||
| -rw-r--r-- | Emby.Naming/Extensions/StringExtensions.cs | 31 | ||||
| -rw-r--r-- | Emby.Naming/TV/SeasonPathParser.cs | 2 |
3 files changed, 1 insertions, 34 deletions
diff --git a/Emby.Naming/Emby.Naming.csproj b/Emby.Naming/Emby.Naming.csproj index 0b1ce2fce..fca0aa1b3 100644 --- a/Emby.Naming/Emby.Naming.csproj +++ b/Emby.Naming/Emby.Naming.csproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>netstandard2.0</TargetFramework> + <TargetFramework>netstandard2.1</TargetFramework> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup> diff --git a/Emby.Naming/Extensions/StringExtensions.cs b/Emby.Naming/Extensions/StringExtensions.cs deleted file mode 100644 index 5512127a8..000000000 --- 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 e81b2bb34..9096ccaf5 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 { |
