mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Plugin system] Move floppy images to dependency injection.
This commit is contained in:
@@ -76,16 +76,16 @@ public sealed class PluginsViewModel : ViewModelBase
|
||||
});
|
||||
}
|
||||
|
||||
foreach(Type imageType in PluginRegister.Singleton.FloppyImages.Values)
|
||||
foreach(IFloppyImage floppyImage in PluginRegister.Singleton.FloppyImages.Values)
|
||||
{
|
||||
if(Activator.CreateInstance(imageType) is not IFloppyImage floppyImage)
|
||||
if(floppyImage is null)
|
||||
continue;
|
||||
|
||||
FloppyImages.Add(new PluginModel
|
||||
{
|
||||
Name = floppyImage.Name,
|
||||
Uuid = floppyImage.Id,
|
||||
Version = Assembly.GetAssembly(imageType)?.GetName().Version?.ToString(),
|
||||
Version = Assembly.GetAssembly(floppyImage.GetType())?.GetName().Version?.ToString(),
|
||||
Author = floppyImage.Author
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user