From fe941cd4811b11d83db6690e7492555daf9657c6 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sat, 17 Dec 2022 19:50:11 +0000 Subject: [PATCH] Use Type for writable media image plugin list. --- PluginBase.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PluginBase.cs b/PluginBase.cs index 9cc0ebdfc..155061d98 100644 --- a/PluginBase.cs +++ b/PluginBase.cs @@ -65,7 +65,7 @@ public class PluginBase /// List of writable floppy image plugins public readonly SortedDictionary WritableFloppyImages; /// List of writable media image plugins - public readonly SortedDictionary WritableImages; + public readonly SortedDictionary WritableImages; /// Initializes the plugins lists public PluginBase() @@ -74,7 +74,7 @@ public class PluginBase ReadOnlyFilesystems = new SortedDictionary(); Partitions = new SortedDictionary(); MediaImages = new SortedDictionary(); - WritableImages = new SortedDictionary(); + WritableImages = new SortedDictionary(); Filters = new SortedDictionary(); FloppyImages = new SortedDictionary(); WritableFloppyImages = new SortedDictionary(); @@ -124,7 +124,7 @@ public class PluginBase foreach(Type type in pluginRegister.GetAllWritableImagePlugins() ?? Enumerable.Empty()) if(Activator.CreateInstance(type) is IBaseWritableImage plugin && !WritableImages.ContainsKey(plugin.Name.ToLower())) - WritableImages.Add(plugin.Name.ToLower(), plugin); + WritableImages.Add(plugin.Name.ToLower(), type); foreach(Type type in pluginRegister.GetAllArchivePlugins() ?? Enumerable.Empty()) if(Activator.CreateInstance(type) is IArchive plugin &&