2024-08-30 15:29:48 +02:00
|
|
|
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>
|
2024-10-31 17:02:06 +01:00
|
|
|
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
|
|
|
}
|
|
|
|
|
}
|