< Summary - Jellyfin

Information
Class: Jellyfin.Api.Models.ConfigurationPageInfo
Assembly: Jellyfin.Api
File(s): /srv/git/jellyfin/Jellyfin.Api/Models/ConfigurationPageInfo.cs
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 66
Line coverage: 100%
Branch coverage
50%
Covered branches: 3
Total branches: 6
Branch coverage: 50%
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(...)50%66100%
.ctor()100%11100%

File(s)

/srv/git/jellyfin/Jellyfin.Api/Models/ConfigurationPageInfo.cs

#LineLine coverage
 1using System;
 2using MediaBrowser.Common.Plugins;
 3using MediaBrowser.Model.Plugins;
 4
 5namespace Jellyfin.Api.Models;
 6
 7/// <summary>
 8/// The configuration page info.
 9/// </summary>
 10public class ConfigurationPageInfo
 11{
 12    /// <summary>
 13    /// Initializes a new instance of the <see cref="ConfigurationPageInfo"/> class.
 14    /// </summary>
 15    /// <param name="plugin">Instance of <see cref="IPlugin"/> interface.</param>
 16    /// <param name="page">Instance of <see cref="PluginPageInfo"/> interface.</param>
 17    public ConfigurationPageInfo(IPlugin? plugin, PluginPageInfo page)
 18    {
 1419        Name = page.Name;
 1420        EnableInMainMenu = page.EnableInMainMenu;
 1421        MenuSection = page.MenuSection;
 1422        MenuIcon = page.MenuIcon;
 1423        DisplayName = string.IsNullOrWhiteSpace(page.DisplayName) ? plugin?.Name : page.DisplayName;
 1424        PluginId = plugin?.Id;
 1425    }
 26
 27    /// <summary>
 28    /// Initializes a new instance of the <see cref="ConfigurationPageInfo"/> class.
 29    /// </summary>
 30    public ConfigurationPageInfo()
 31    {
 732        Name = string.Empty;
 733    }
 34
 35    /// <summary>
 36    /// Gets or sets the name.
 37    /// </summary>
 38    /// <value>The name.</value>
 39    public string Name { get; set; }
 40
 41    /// <summary>
 42    /// Gets or sets a value indicating whether the configurations page is enabled in the main menu.
 43    /// </summary>
 44    public bool EnableInMainMenu { get; set; }
 45
 46    /// <summary>
 47    /// Gets or sets the menu section.
 48    /// </summary>
 49    public string? MenuSection { get; set; }
 50
 51    /// <summary>
 52    /// Gets or sets the menu icon.
 53    /// </summary>
 54    public string? MenuIcon { get; set; }
 55
 56    /// <summary>
 57    /// Gets or sets the display name.
 58    /// </summary>
 59    public string? DisplayName { get; set; }
 60
 61    /// <summary>
 62    /// Gets or sets the plugin id.
 63    /// </summary>
 64    /// <value>The plugin id.</value>
 65    public Guid? PluginId { get; set; }
 66}