compose and authority fixes. finish sprints.
This commit is contained in:
@@ -140,7 +140,23 @@ public static class PluginLoader
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Activator.CreateInstance(candidate) is not TPlugin plugin)
|
||||
if (candidate.GetConstructor(Type.EmptyTypes) is null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
TPlugin? plugin;
|
||||
try
|
||||
{
|
||||
plugin = Activator.CreateInstance(candidate) as TPlugin;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Skip plugins that cannot be created via default constructor.
|
||||
continue;
|
||||
}
|
||||
|
||||
if (plugin is null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -170,4 +186,3 @@ public static class PluginLoader
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user