From d603dca1ad8f1ab82243dba982e7d3244b8f1259 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sat, 17 Dec 2022 20:03:37 +0000 Subject: [PATCH] Use Type for byte addressable plugin list. --- PluginBase.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PluginBase.cs b/PluginBase.cs index fb8c47b..7d1e251 100644 --- a/PluginBase.cs +++ b/PluginBase.cs @@ -49,7 +49,7 @@ public class PluginBase /// List of all archive formats public readonly SortedDictionary Archives; /// List of byte addressable image plugins - public readonly SortedDictionary ByteAddressableImages; + public readonly SortedDictionary ByteAddressableImages; /// List of all filesystem plugins public readonly SortedDictionary Filesystems; /// List of filter plugins @@ -79,7 +79,7 @@ public class PluginBase FloppyImages = new SortedDictionary(); WritableFloppyImages = new SortedDictionary(); Archives = new SortedDictionary(); - ByteAddressableImages = new SortedDictionary(); + ByteAddressableImages = new SortedDictionary(); } /// Adds plugins to the central plugin register @@ -134,6 +134,6 @@ public class PluginBase foreach(Type type in pluginRegister.GetAllByteAddressablePlugins() ?? Enumerable.Empty()) if(Activator.CreateInstance(type) is IByteAddressableImage plugin && !ByteAddressableImages.ContainsKey(plugin.Name.ToLower())) - ByteAddressableImages.Add(plugin.Name.ToLower(), plugin); + ByteAddressableImages.Add(plugin.Name.ToLower(), type); } } \ No newline at end of file