mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use Type for byte addressable plugin list.
This commit is contained in:
Submodule Aaru.CommonTypes updated: 29535b5b36...d603dca1ad
@@ -31,7 +31,6 @@
|
|||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using Aaru.CommonTypes;
|
using Aaru.CommonTypes;
|
||||||
using Aaru.CommonTypes.Interfaces;
|
using Aaru.CommonTypes.Interfaces;
|
||||||
using Aaru.Console;
|
using Aaru.Console;
|
||||||
@@ -83,10 +82,16 @@ public static class ImageFormat
|
|||||||
return imageFormat;
|
return imageFormat;
|
||||||
|
|
||||||
// Check all but RAW plugin
|
// Check all but RAW plugin
|
||||||
foreach(IByteAddressableImage imagePlugin in plugins.ByteAddressableImages.Values.Where(imagePlugin =>
|
foreach(Type pluginType in plugins.ByteAddressableImages.Values)
|
||||||
imagePlugin.Id != new Guid("12345678-AAAA-BBBB-CCCC-123456789000")))
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if(Activator.CreateInstance(pluginType) is not IByteAddressableImage imagePlugin)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if(imagePlugin.Id == new Guid("12345678-AAAA-BBBB-CCCC-123456789000"))
|
||||||
|
continue;
|
||||||
|
|
||||||
AaruConsole.DebugWriteLine("Format detection", Localization.Core.Trying_plugin_0, imagePlugin.Name);
|
AaruConsole.DebugWriteLine("Format detection", Localization.Core.Trying_plugin_0, imagePlugin.Name);
|
||||||
|
|
||||||
if(!imagePlugin.Identify(imageFilter))
|
if(!imagePlugin.Identify(imageFilter))
|
||||||
@@ -101,6 +106,7 @@ public static class ImageFormat
|
|||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(imageFormat != null)
|
if(imageFormat != null)
|
||||||
return imageFormat;
|
return imageFormat;
|
||||||
|
|||||||
Reference in New Issue
Block a user