mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-03 19:17:24 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			827 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			827 B
		
	
	
	
		
			C#
		
	
	
	
	
	
#pragma warning disable CA1813 // Avoid unsealed attributes
 | 
						|
 | 
						|
using System;
 | 
						|
 | 
						|
namespace Jellyfin.Api.Attributes;
 | 
						|
 | 
						|
/// <summary>
 | 
						|
/// Internal produces image attribute.
 | 
						|
/// </summary>
 | 
						|
[AttributeUsage(AttributeTargets.Method)]
 | 
						|
public class ProducesFileAttribute : Attribute
 | 
						|
{
 | 
						|
    private readonly string[] _contentTypes;
 | 
						|
 | 
						|
    /// <summary>
 | 
						|
    /// Initializes a new instance of the <see cref="ProducesFileAttribute"/> class.
 | 
						|
    /// </summary>
 | 
						|
    /// <param name="contentTypes">Content types this endpoint produces.</param>
 | 
						|
    public ProducesFileAttribute(params string[] contentTypes)
 | 
						|
    {
 | 
						|
        _contentTypes = contentTypes;
 | 
						|
    }
 | 
						|
 | 
						|
    /// <summary>
 | 
						|
    /// Gets the configured content types.
 | 
						|
    /// </summary>
 | 
						|
    /// <returns>the configured content types.</returns>
 | 
						|
    public string[] ContentTypes => _contentTypes;
 | 
						|
}
 |