Merge pull request #5380 from Bond-009/plugins

100% branch coverage for DashboardController
This commit is contained in:
Bond-009 2021-03-06 00:59:28 +01:00 committed by GitHub
commit e839929b91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.