mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Move partitions plugins to a separate library.
This commit is contained in:
@@ -60,7 +60,9 @@ namespace DiscImageChef
|
||||
|
||||
public void RegisterAllPlugins()
|
||||
{
|
||||
Assembly assembly = Assembly.GetAssembly(typeof(ImagePlugin));
|
||||
Assembly assembly;
|
||||
|
||||
assembly = Assembly.GetAssembly(typeof(ImagePlugin));
|
||||
|
||||
foreach (Type type in assembly.GetTypes())
|
||||
{
|
||||
@@ -78,6 +80,24 @@ namespace DiscImageChef
|
||||
}
|
||||
}
|
||||
|
||||
assembly = Assembly.GetAssembly(typeof(PartPlugin));
|
||||
|
||||
foreach (Type type in assembly.GetTypes())
|
||||
{
|
||||
try
|
||||
{
|
||||
if (type.IsSubclassOf(typeof(PartPlugin)))
|
||||
{
|
||||
PartPlugin plugin = (PartPlugin)type.GetConstructor(Type.EmptyTypes).Invoke(new object[] { });
|
||||
RegisterPartPlugin(plugin);
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Console.WriteLine(exception);
|
||||
}
|
||||
}
|
||||
|
||||
assembly = Assembly.GetExecutingAssembly();
|
||||
|
||||
foreach (Type type in assembly.GetTypes())
|
||||
@@ -89,12 +109,6 @@ namespace DiscImageChef
|
||||
Plugin plugin = (Plugin)type.GetConstructor(new [] { typeof(PluginBase) }).Invoke(new object[] { this });
|
||||
RegisterPlugin(plugin);
|
||||
}
|
||||
else if (type.IsSubclassOf(typeof(PartPlugin)))
|
||||
{
|
||||
PartPlugin partplugin = (PartPlugin)type.GetConstructor(new [] { typeof(PluginBase) }).Invoke(new object[] { this });
|
||||
RegisterPartPlugin(partplugin);
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user