mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-13 13:46:24 +00:00
Update StyleCop
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<!-- Code Analyzers-->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" />
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.376" PrivateAssets="All" />
|
||||
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Jellyfin.Extensions.Json
|
||||
/// -> AddJellyfinApi
|
||||
/// -> AddJsonOptions.
|
||||
/// </summary>
|
||||
private static readonly JsonSerializerOptions _jsonSerializerOptions = new ()
|
||||
private static readonly JsonSerializerOptions _jsonSerializerOptions = new()
|
||||
{
|
||||
ReadCommentHandling = JsonCommentHandling.Disallow,
|
||||
WriteIndented = false,
|
||||
@@ -44,12 +44,12 @@ namespace Jellyfin.Extensions.Json
|
||||
}
|
||||
};
|
||||
|
||||
private static readonly JsonSerializerOptions _pascalCaseJsonSerializerOptions = new (_jsonSerializerOptions)
|
||||
private static readonly JsonSerializerOptions _pascalCaseJsonSerializerOptions = new(_jsonSerializerOptions)
|
||||
{
|
||||
PropertyNamingPolicy = null
|
||||
};
|
||||
|
||||
private static readonly JsonSerializerOptions _camelCaseJsonSerializerOptions = new (_jsonSerializerOptions)
|
||||
private static readonly JsonSerializerOptions _camelCaseJsonSerializerOptions = new(_jsonSerializerOptions)
|
||||
{
|
||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
|
||||
};
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Jellyfin.Extensions
|
||||
/// <param name="separator">The separator to split on.</param>
|
||||
/// <returns>The enumerator struct.</returns>
|
||||
[Pure]
|
||||
public static Enumerator SpanSplit(this string str, char separator) => new (str.AsSpan(), separator);
|
||||
public static Enumerator SpanSplit(this string str, char separator) => new(str.AsSpan(), separator);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new span split enumerator.
|
||||
@@ -52,7 +52,7 @@ namespace Jellyfin.Extensions
|
||||
/// <param name="separator">The separator to split on.</param>
|
||||
/// <returns>The enumerator struct.</returns>
|
||||
[Pure]
|
||||
public static Enumerator Split(this ReadOnlySpan<char> str, char separator) => new (str, separator);
|
||||
public static Enumerator Split(this ReadOnlySpan<char> str, char separator) => new(str, separator);
|
||||
|
||||
/// <summary>
|
||||
/// Provides an enumerator for the substrings seperated by the separator.
|
||||
|
||||
Reference in New Issue
Block a user