From 29535b5b360f1440e9f8554c7488fb929a214ad1 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sat, 17 Dec 2022 20:01:27 +0000 Subject: [PATCH] Use Type for archive plugin list. --- PluginBase.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PluginBase.cs b/PluginBase.cs index ecdbe2798..fb8c47b0e 100644 --- a/PluginBase.cs +++ b/PluginBase.cs @@ -47,7 +47,7 @@ namespace Aaru.CommonTypes; public class PluginBase { /// List of all archive formats - public readonly SortedDictionary Archives; + public readonly SortedDictionary Archives; /// List of byte addressable image plugins public readonly SortedDictionary ByteAddressableImages; /// List of all filesystem plugins @@ -78,7 +78,7 @@ public class PluginBase Filters = new SortedDictionary(); FloppyImages = new SortedDictionary(); WritableFloppyImages = new SortedDictionary(); - Archives = new SortedDictionary(); + Archives = new SortedDictionary(); ByteAddressableImages = new SortedDictionary(); } @@ -129,7 +129,7 @@ public class PluginBase foreach(Type type in pluginRegister.GetAllArchivePlugins() ?? Enumerable.Empty()) if(Activator.CreateInstance(type) is IArchive plugin && !Archives.ContainsKey(plugin.Name.ToLower())) - Archives.Add(plugin.Name.ToLower(), plugin); + Archives.Add(plugin.Name.ToLower(), type); foreach(Type type in pluginRegister.GetAllByteAddressablePlugins() ?? Enumerable.Empty()) if(Activator.CreateInstance(type) is IByteAddressableImage plugin &&