mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
🎨Initializate list of plugins at the same time PluginBase is constructed.
This commit is contained in:
@@ -469,7 +469,6 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
(double)blockSize * (double)(blocks + 1) / 1024 / (totalChkDuration / 1000));
|
||||
|
||||
PluginBase plugins = new PluginBase();
|
||||
plugins.RegisterAllPlugins();
|
||||
|
||||
FiltersList filtersList = new FiltersList();
|
||||
IFilter inputFilter = filtersList.GetFilter(outputPrefix + ".bin");
|
||||
|
||||
@@ -594,7 +594,6 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
(double)blockSize * (double)(blocks + 1) / 1024 / (totalChkDuration / 1000));
|
||||
|
||||
PluginBase plugins = new PluginBase();
|
||||
plugins.RegisterAllPlugins();
|
||||
FiltersList filtersList = new FiltersList();
|
||||
IFilter inputFilter = filtersList.GetFilter(outputPrefix + outputExtension);
|
||||
|
||||
|
||||
@@ -451,7 +451,6 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
(double)blockSize * (double)(blocks + 1) / 1024 / (totalChkDuration / 1000));
|
||||
|
||||
PluginBase plugins = new PluginBase();
|
||||
plugins.RegisterAllPlugins();
|
||||
|
||||
FiltersList filtersList = new FiltersList();
|
||||
IFilter inputFilter = filtersList.GetFilter(outputPrefix + ".bin");
|
||||
|
||||
@@ -794,7 +794,6 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
(double)BLOCK_SIZE * (double)(blocks + 1) / 1024 / (totalChkDuration / 1000));
|
||||
|
||||
PluginBase plugins = new PluginBase();
|
||||
plugins.RegisterAllPlugins();
|
||||
FiltersList filtersList = new FiltersList();
|
||||
IFilter inputFilter = filtersList.GetFilter(outputPrefix + ".iso");
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@ namespace DiscImageChef.Core
|
||||
public static void Identify(IMediaImage imagePlugin, out List<string> idPlugins, Partition partition)
|
||||
{
|
||||
PluginBase plugins = new PluginBase();
|
||||
plugins.RegisterAllPlugins();
|
||||
|
||||
idPlugins = (from plugin in plugins.PluginsList.Values
|
||||
where plugin.Identify(imagePlugin, partition)
|
||||
|
||||
@@ -50,7 +50,6 @@ namespace DiscImageChef.Core
|
||||
try
|
||||
{
|
||||
PluginBase plugins = new PluginBase();
|
||||
plugins.RegisterAllPlugins();
|
||||
|
||||
IMediaImage imageFormat = null;
|
||||
|
||||
|
||||
@@ -52,7 +52,6 @@ namespace DiscImageChef.Core
|
||||
public static List<Partition> GetAll(IMediaImage image)
|
||||
{
|
||||
PluginBase plugins = new PluginBase();
|
||||
plugins.RegisterAllPlugins();
|
||||
List<Partition> foundPartitions = new List<Partition>();
|
||||
List<Partition> childPartitions = new List<Partition>();
|
||||
List<ulong> checkedLocations = new List<ulong>();
|
||||
|
||||
@@ -50,15 +50,15 @@ namespace DiscImageChef.Core
|
||||
/// <summary>
|
||||
/// List of all media image plugins
|
||||
/// </summary>
|
||||
public SortedDictionary<string, IMediaImage> ImagePluginsList;
|
||||
public readonly SortedDictionary<string, IMediaImage> ImagePluginsList;
|
||||
/// <summary>
|
||||
/// List of all partition plugins
|
||||
/// </summary>
|
||||
public SortedDictionary<string, IPartition> PartPluginsList;
|
||||
public readonly SortedDictionary<string, IPartition> PartPluginsList;
|
||||
/// <summary>
|
||||
/// List of all filesystem plugins
|
||||
/// </summary>
|
||||
public SortedDictionary<string, IFilesystem> PluginsList;
|
||||
public readonly SortedDictionary<string, IFilesystem> PluginsList;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the plugins lists
|
||||
@@ -68,13 +68,7 @@ namespace DiscImageChef.Core
|
||||
PluginsList = new SortedDictionary<string, IFilesystem>();
|
||||
PartPluginsList = new SortedDictionary<string, IPartition>();
|
||||
ImagePluginsList = new SortedDictionary<string, IMediaImage>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fills the plugins lists
|
||||
/// </summary>
|
||||
public void RegisterAllPlugins()
|
||||
{
|
||||
Assembly assembly = Assembly.GetAssembly(typeof(IMediaImage));
|
||||
|
||||
foreach(Type type in assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IMediaImage))))
|
||||
|
||||
@@ -53,7 +53,6 @@ namespace DiscImageChef.Core
|
||||
{
|
||||
CICMMetadataType sidecar = new CICMMetadataType();
|
||||
PluginBase plugins = new PluginBase();
|
||||
plugins.RegisterAllPlugins();
|
||||
|
||||
FileInfo fi = new FileInfo(imagePath);
|
||||
FileStream fs = new FileStream(imagePath, FileMode.Open, FileAccess.Read);
|
||||
|
||||
@@ -78,7 +78,6 @@ namespace DiscImageChef.Commands
|
||||
}
|
||||
|
||||
PluginBase plugins = new PluginBase();
|
||||
plugins.RegisterAllPlugins();
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -45,7 +45,6 @@ namespace DiscImageChef.Commands
|
||||
internal static void ListFormats(FormatsOptions formatsOptions)
|
||||
{
|
||||
PluginBase plugins = new PluginBase();
|
||||
plugins.RegisterAllPlugins();
|
||||
FiltersList filtersList = new FiltersList();
|
||||
|
||||
DicConsole.WriteLine("Supported filters:");
|
||||
|
||||
@@ -74,7 +74,6 @@ namespace DiscImageChef.Commands
|
||||
}
|
||||
|
||||
PluginBase plugins = new PluginBase();
|
||||
plugins.RegisterAllPlugins();
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user