mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Plugin system] Move filesystems to dependency injection.
This commit is contained in:
@@ -709,14 +709,14 @@ public sealed partial class Sidecar
|
||||
|
||||
List<FileSystem> lstFs = new();
|
||||
|
||||
foreach(Type pluginType in plugins.Filesystems.Values)
|
||||
foreach(IFilesystem fs in plugins.Filesystems.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(_aborted)
|
||||
return;
|
||||
|
||||
if(Activator.CreateInstance(pluginType) is not IFilesystem fs)
|
||||
if(fs is null)
|
||||
continue;
|
||||
|
||||
if(!fs.Identify(image, partition))
|
||||
@@ -776,14 +776,14 @@ public sealed partial class Sidecar
|
||||
|
||||
List<FileSystem> lstFs = new();
|
||||
|
||||
foreach(Type pluginType in plugins.Filesystems.Values)
|
||||
foreach(IFilesystem fs in plugins.Filesystems.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(_aborted)
|
||||
return;
|
||||
|
||||
if(Activator.CreateInstance(pluginType) is not IFilesystem fs)
|
||||
if(fs is null)
|
||||
continue;
|
||||
|
||||
if(!fs.Identify(image, wholePart))
|
||||
|
||||
@@ -527,7 +527,7 @@ public sealed partial class Sidecar
|
||||
|
||||
List<FileSystem> lstFs = new();
|
||||
|
||||
foreach(Type pluginType in plugins.Filesystems.Values)
|
||||
foreach(IFilesystem fs in plugins.Filesystems.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -538,7 +538,7 @@ public sealed partial class Sidecar
|
||||
return;
|
||||
}
|
||||
|
||||
if(Activator.CreateInstance(pluginType) is not IFilesystem fs)
|
||||
if(fs is null)
|
||||
continue;
|
||||
|
||||
if(!fs.Identify(image, partition))
|
||||
@@ -590,7 +590,7 @@ public sealed partial class Sidecar
|
||||
Sequence = xmlTrk.Sequence.Number
|
||||
};
|
||||
|
||||
foreach(Type pluginType in plugins.Filesystems.Values)
|
||||
foreach(IFilesystem fs in plugins.Filesystems.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -601,7 +601,7 @@ public sealed partial class Sidecar
|
||||
return;
|
||||
}
|
||||
|
||||
if(Activator.CreateInstance(pluginType) is not IFilesystem fs)
|
||||
if(fs is null)
|
||||
continue;
|
||||
|
||||
if(!fs.Identify(image, xmlPart))
|
||||
|
||||
Reference in New Issue
Block a user