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