diff --git a/src/EntityFramework.Storage/Extensions/StringsExtensions.cs b/src/EntityFramework.Storage/Extensions/StringsExtensions.cs index 01407b22c..8d86281f4 100644 --- a/src/EntityFramework.Storage/Extensions/StringsExtensions.cs +++ b/src/EntityFramework.Storage/Extensions/StringsExtensions.cs @@ -27,7 +27,7 @@ public static string ToSpaceSeparatedString(this IEnumerable list) public static IEnumerable FromSpaceSeparatedString(this string input) { input = input.Trim(); - return input.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList(); + return input.Split(' ' , StringSplitOptions.RemoveEmptyEntries).ToList(); } public static List ParseScopesString(this string scopes) @@ -38,7 +38,7 @@ public static List ParseScopesString(this string scopes) } scopes = scopes.Trim(); - var parsedScopes = scopes.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Distinct().ToList(); + var parsedScopes = scopes.Split(' ', StringSplitOptions.RemoveEmptyEntries).Distinct().ToList(); if (parsedScopes.Any()) { diff --git a/src/EntityFramework.Storage/Mappers/AllowedSigningAlgorithmsConverter.cs b/src/EntityFramework.Storage/Mappers/AllowedSigningAlgorithmsConverter.cs index 3583e0fe8..eaf4662fc 100644 --- a/src/EntityFramework.Storage/Mappers/AllowedSigningAlgorithmsConverter.cs +++ b/src/EntityFramework.Storage/Mappers/AllowedSigningAlgorithmsConverter.cs @@ -25,7 +25,7 @@ public static ICollection Convert(string sourceMember) if (!String.IsNullOrWhiteSpace(sourceMember)) { sourceMember = sourceMember.Trim(); - foreach (var item in sourceMember.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Distinct()) + foreach (var item in sourceMember.Split(',', StringSplitOptions.RemoveEmptyEntries).Distinct()) { list.Add(item); } diff --git a/src/IdentityServer/Extensions/ServerUrlExtensions.cs b/src/IdentityServer/Extensions/ServerUrlExtensions.cs index 9c9c793c9..5c669d4bc 100644 --- a/src/IdentityServer/Extensions/ServerUrlExtensions.cs +++ b/src/IdentityServer/Extensions/ServerUrlExtensions.cs @@ -19,7 +19,7 @@ public static class ServerUrlExtensions /// public static string GetUnicodeOrigin(this IServerUrls urls) { - var split = urls.Origin.Split(new[] { "://" }, StringSplitOptions.RemoveEmptyEntries); + var split = urls.Origin.Split("://", StringSplitOptions.RemoveEmptyEntries); var scheme = split.First(); var host = HostString.FromUriComponent(split.Last()).Value; diff --git a/src/IdentityServer/Extensions/StringsExtensions.cs b/src/IdentityServer/Extensions/StringsExtensions.cs index 7bf78d27a..a92d2ff1b 100644 --- a/src/IdentityServer/Extensions/StringsExtensions.cs +++ b/src/IdentityServer/Extensions/StringsExtensions.cs @@ -30,7 +30,7 @@ public static string ToSpaceSeparatedString(this IEnumerable list) public static IEnumerable FromSpaceSeparatedString(this string input) { input = input.Trim(); - return input.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList(); + return input.Split(' ', StringSplitOptions.RemoveEmptyEntries).ToList(); } public static List ParseScopesString(this string scopes) @@ -41,7 +41,7 @@ public static List ParseScopesString(this string scopes) } scopes = scopes.Trim(); - var parsedScopes = scopes.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Distinct().ToList(); + var parsedScopes = scopes.Split(' ', StringSplitOptions.RemoveEmptyEntries).Distinct().ToList(); if (parsedScopes.Any()) { diff --git a/src/IdentityServer/Services/Default/DefaultServerUrls.cs b/src/IdentityServer/Services/Default/DefaultServerUrls.cs index 8bd46e388..8e468db20 100644 --- a/src/IdentityServer/Services/Default/DefaultServerUrls.cs +++ b/src/IdentityServer/Services/Default/DefaultServerUrls.cs @@ -34,7 +34,7 @@ public string Origin } set { - var split = value.Split(new[] { "://" }, StringSplitOptions.RemoveEmptyEntries); + var split = value.Split("://", StringSplitOptions.RemoveEmptyEntries); var request = _httpContextAccessor.HttpContext.Request; request.Scheme = split.First(); diff --git a/src/Storage/Models/OidcProvider.cs b/src/Storage/Models/OidcProvider.cs index c81708506..fb1aecdc1 100644 --- a/src/Storage/Models/OidcProvider.cs +++ b/src/Storage/Models/OidcProvider.cs @@ -93,7 +93,7 @@ public IEnumerable Scopes { get { - var scopes = Scope?.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList() ?? new List(); + var scopes = Scope?.Split(' ', StringSplitOptions.RemoveEmptyEntries).ToList() ?? new List(); return scopes; } }