100% branch coverage for DashboardController

This commit is contained in:
Bond_009 2021-03-05 11:15:14 +01:00
parent ed7154db68
commit a6d0db5d04
3 changed files with 5 additions and 5 deletions

View File

@ -34,7 +34,7 @@ namespace Emby.Server.Implementations.Plugins
private readonly ILogger<PluginManager> _logger;
private readonly IApplicationHost _appHost;
private readonly ServerConfiguration _config;
private readonly IList<LocalPlugin> _plugins;
private readonly List<LocalPlugin> _plugins;
private readonly Version _minimumVersion;
private IHttpClientFactory? _httpClientFactory;
@ -94,7 +94,7 @@ namespace Emby.Server.Implementations.Plugins
/// <summary>
/// Gets the Plugins.
/// </summary>
public IList<LocalPlugin> Plugins => _plugins;
public IReadOnlyList<LocalPlugin> Plugins => _plugins;
/// <summary>
/// Returns all the assemblies.

View File

@ -95,9 +95,9 @@ namespace Jellyfin.Api.Controllers
return GetPluginPages(plugin).Select(i => new ConfigurationPageInfo(plugin.Instance, i.Item1));
}
private IEnumerable<Tuple<PluginPageInfo, IPlugin>> GetPluginPages(LocalPlugin? plugin)
private IEnumerable<Tuple<PluginPageInfo, IPlugin>> GetPluginPages(LocalPlugin plugin)
{
if (plugin?.Instance is not IHasWebPages hasWebPages)
if (plugin.Instance is not IHasWebPages hasWebPages)
{
return Enumerable.Empty<Tuple<PluginPageInfo, IPlugin>>();
}

View File

@ -17,7 +17,7 @@ namespace MediaBrowser.Common.Plugins
/// <summary>
/// Gets the Plugins.
/// </summary>
IList<LocalPlugin> Plugins { get; }
IReadOnlyList<LocalPlugin> Plugins { get; }
/// <summary>
/// Creates the plugins.