mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-24 02:02:29 -04:00
https://github.com/davidfowl/AspNetCoreDiagnosticScenarios/blob/master/AsyncGuidance.md#prefer-asyncawait-over-directly-returning-task The performance impact is negligible (and it's me saying that!)
20 lines
483 B
C#
20 lines
483 B
C#
using System.Net.Mime;
|
|
using Microsoft.AspNetCore.Mvc.Formatters;
|
|
|
|
namespace Jellyfin.Api.Formatters;
|
|
|
|
/// <summary>
|
|
/// Xml output formatter.
|
|
/// </summary>
|
|
public sealed class XmlOutputFormatter : StringOutputFormatter
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="XmlOutputFormatter"/> class.
|
|
/// </summary>
|
|
public XmlOutputFormatter()
|
|
{
|
|
SupportedMediaTypes.Clear();
|
|
SupportedMediaTypes.Add(MediaTypeNames.Text.Xml);
|
|
}
|
|
}
|