refactor a good bit of stuff for better dependency injection
fix regular expression for T6 log parsing
This commit is contained in:
@ -11,11 +11,8 @@ namespace WebfrontCore.Controllers
|
||||
{
|
||||
public class HomeController : BaseController
|
||||
{
|
||||
private readonly IPluginImporter _pluginImporter;
|
||||
|
||||
public HomeController(IManager manager, IPluginImporter importer) : base(manager)
|
||||
public HomeController(IManager manager) : base(manager)
|
||||
{
|
||||
_pluginImporter = importer;
|
||||
}
|
||||
|
||||
public async Task<IActionResult> Index()
|
||||
@ -68,7 +65,7 @@ namespace WebfrontCore.Controllers
|
||||
var pluginType = _cmd.GetType().Assembly.GetTypes().FirstOrDefault(_type => _type.Assembly != excludedAssembly && typeof(IPlugin).IsAssignableFrom(_type));
|
||||
return pluginType == null ?
|
||||
Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_HELP_COMMAND_NATIVE"] :
|
||||
_pluginImporter.ActivePlugins.First(_plugin => _plugin.GetType() == pluginType).Name; // for now we're just returning the name of the plugin, maybe later we'll include more info
|
||||
Manager.Plugins.First(_plugin => _plugin.GetType() == pluginType).Name; // for now we're just returning the name of the plugin, maybe later we'll include more info
|
||||
})
|
||||
.Select(_grp => (_grp.Key, _grp.AsEnumerable()));
|
||||
|
||||
|
Reference in New Issue
Block a user