Files
jellyfin-jellyfin-1/Jellyfin.Api/Formatters/XmlOutputFormatter.cs

20 lines
483 B
C#
Raw Normal View History

using System.Net.Mime;
2020-08-15 10:39:24 -06:00
using Microsoft.AspNetCore.Mvc.Formatters;
2023-01-31 12:18:10 +01:00
namespace Jellyfin.Api.Formatters;
/// <summary>
/// Xml output formatter.
/// </summary>
public sealed class XmlOutputFormatter : StringOutputFormatter
2020-08-15 10:39:24 -06:00
{
/// <summary>
2023-01-31 12:18:10 +01:00
/// Initializes a new instance of the <see cref="XmlOutputFormatter"/> class.
2020-08-15 10:39:24 -06:00
/// </summary>
2023-01-31 12:18:10 +01:00
public XmlOutputFormatter()
2020-08-15 10:39:24 -06:00
{
2023-01-31 12:18:10 +01:00
SupportedMediaTypes.Clear();
SupportedMediaTypes.Add(MediaTypeNames.Text.Xml);
2020-08-15 10:39:24 -06:00
}
}