jellyfin/Jellyfin.Api/Attributes/AcceptsFileAttribute.cs

30 lines
824 B
C#
Raw Normal View History

2021-11-16 10:31:57 -05:00
#pragma warning disable CA1813 // Avoid unsealed attributes
using System;
2021-02-10 18:12:52 -05:00
2023-01-31 06:18:10 -05:00
namespace Jellyfin.Api.Attributes;
/// <summary>
/// Internal produces image attribute.
/// </summary>
[AttributeUsage(AttributeTargets.Method)]
public class AcceptsFileAttribute : Attribute
2021-02-10 18:12:52 -05:00
{
2023-01-31 06:18:10 -05:00
private readonly string[] _contentTypes;
2021-02-10 18:12:52 -05:00
/// <summary>
2023-01-31 06:18:10 -05:00
/// Initializes a new instance of the <see cref="AcceptsFileAttribute"/> class.
2021-02-10 18:12:52 -05:00
/// </summary>
2023-01-31 06:18:10 -05:00
/// <param name="contentTypes">Content types this endpoint produces.</param>
public AcceptsFileAttribute(params string[] contentTypes)
2021-02-10 18:12:52 -05:00
{
2023-01-31 06:18:10 -05:00
_contentTypes = contentTypes;
2021-02-10 18:12:52 -05:00
}
2023-01-31 06:18:10 -05:00
/// <summary>
/// Gets the configured content types.
/// </summary>
/// <returns>the configured content types.</returns>
public string[] ContentTypes => _contentTypes;
2021-02-10 18:12:52 -05:00
}