aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2023-01-31 12:18:10 +0100
committerShadowghost <Ghost_of_Stone@web.de>2023-02-02 18:50:33 +0100
commitf5f890e68562e55d4bed16c454c4b4305152b296 (patch)
treeb52e3b45ceb2faa446153866600b4456fed44c8b /Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs
parent58b3945805db4f88bc069ee84013bdf85d7429b1 (diff)
Migrate to file-scoped namespaces
Diffstat (limited to 'Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs')
-rw-r--r--Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs25
1 files changed, 12 insertions, 13 deletions
diff --git a/Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs b/Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs
index 5d77dbf4c..b5b575278 100644
--- a/Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs
+++ b/Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs
@@ -3,22 +3,21 @@ using Jellyfin.Extensions.Json;
using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.Net.Http.Headers;
-namespace Jellyfin.Api.Formatters
+namespace Jellyfin.Api.Formatters;
+
+/// <summary>
+/// Pascal Case Json Profile Formatter.
+/// </summary>
+public class PascalCaseJsonProfileFormatter : SystemTextJsonOutputFormatter
{
/// <summary>
- /// Pascal Case Json Profile Formatter.
+ /// Initializes a new instance of the <see cref="PascalCaseJsonProfileFormatter"/> class.
/// </summary>
- public class PascalCaseJsonProfileFormatter : SystemTextJsonOutputFormatter
+ public PascalCaseJsonProfileFormatter() : base(JsonDefaults.PascalCaseOptions)
{
- /// <summary>
- /// Initializes a new instance of the <see cref="PascalCaseJsonProfileFormatter"/> class.
- /// </summary>
- public PascalCaseJsonProfileFormatter() : base(JsonDefaults.PascalCaseOptions)
- {
- SupportedMediaTypes.Clear();
- // Add application/json for default formatter
- SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(MediaTypeNames.Application.Json));
- SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(JsonDefaults.PascalCaseMediaType));
- }
+ SupportedMediaTypes.Clear();
+ // Add application/json for default formatter
+ SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(MediaTypeNames.Application.Json));
+ SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(JsonDefaults.PascalCaseMediaType));
}
}