< Summary - Jellyfin

Information
Class: Jellyfin.Api.Attributes.ProducesFileAttribute
Assembly: Jellyfin.Api
File(s): /srv/git/jellyfin/Jellyfin.Api/Attributes/ProducesFileAttribute.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 29
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_ContentTypes()100%11100%

File(s)

/srv/git/jellyfin/Jellyfin.Api/Attributes/ProducesFileAttribute.cs

#LineLine coverage
 1#pragma warning disable CA1813 // Avoid unsealed attributes
 2
 3using System;
 4
 5namespace Jellyfin.Api.Attributes;
 6
 7/// <summary>
 8/// Internal produces image attribute.
 9/// </summary>
 10[AttributeUsage(AttributeTargets.Method)]
 11public class ProducesFileAttribute : Attribute
 12{
 13    private readonly string[] _contentTypes;
 14
 15    /// <summary>
 16    /// Initializes a new instance of the <see cref="ProducesFileAttribute"/> class.
 17    /// </summary>
 18    /// <param name="contentTypes">Content types this endpoint produces.</param>
 226719    public ProducesFileAttribute(params string[] contentTypes)
 20    {
 226721        _contentTypes = contentTypes;
 226722    }
 23
 24    /// <summary>
 25    /// Gets the configured content types.
 26    /// </summary>
 27    /// <returns>the configured content types.</returns>
 6828    public string[] ContentTypes => _contentTypes;
 29}