From f5f890e68562e55d4bed16c454c4b4305152b296 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Tue, 31 Jan 2023 12:18:10 +0100 Subject: Migrate to file-scoped namespaces --- .../Formatters/PascalCaseJsonProfileFormatter.cs | 25 +++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs') 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; + +/// +/// Pascal Case Json Profile Formatter. +/// +public class PascalCaseJsonProfileFormatter : SystemTextJsonOutputFormatter { /// - /// Pascal Case Json Profile Formatter. + /// Initializes a new instance of the class. /// - public class PascalCaseJsonProfileFormatter : SystemTextJsonOutputFormatter + public PascalCaseJsonProfileFormatter() : base(JsonDefaults.PascalCaseOptions) { - /// - /// Initializes a new instance of the class. - /// - 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)); } } -- cgit v1.2.3