Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'Development' into issue31
  • Loading branch information
Hirogen authored Mar 11, 2025
commit 479a7baa098e7483ce654010361cab2457af6d7e
27 changes: 1 addition & 26 deletions src/LogExpert/Classes/PluginRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,32 +90,7 @@ internal void LoadPlugins()
{
try
{
Assembly assembly = Assembly.LoadFrom(dllName);
var types = assembly.GetTypes().Where(t => t.GetInterfaces().Any(i => i.FullName == interfaceName));
foreach (var type in types)
{
_logger.Info($"Type {type.FullName} in assembly {assembly.FullName} implements {interfaceName}");

ConstructorInfo cti = type.GetConstructor(Type.EmptyTypes);
if (cti != null)
{
object o = cti.Invoke([]);
RegisteredColumnizers.Add((ILogLineColumnizer)o);

if (o is IColumnizerConfigurator configurator)
{
configurator.LoadConfig(ConfigManager.Settings.Preferences.PortableMode ? ConfigManager.PortableModeDir : ConfigManager.ConfigDir);
}

if (o is ILogExpertPlugin plugin)
{
_pluginList.Add(plugin);
plugin.PluginLoaded();
}

_logger.Info("Added columnizer {0}", type.Name);
}
}
LoadPluginAssembly(dllName, interfaceName);
}
catch (Exception ex) when (ex is BadImageFormatException or FileLoadException)
{
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.