mirror of
https://github.com/aaru-dps/Aaru.git
synced 2026-05-19 02:37:55 +00:00
Use Type for archive plugin list.
This commit is contained in:
Submodule Aaru.CommonTypes updated: 8336bde2df...29535b5b36
@@ -251,11 +251,16 @@ sealed class FormatsCommand : Command
|
||||
|
||||
table.AddColumn("Archive format");
|
||||
|
||||
foreach(KeyValuePair<string, IArchive> kvp in plugins.Archives)
|
||||
foreach(KeyValuePair<string, Type> kvp in plugins.Archives)
|
||||
{
|
||||
if(Activator.CreateInstance(kvp.Value) is not IArchive archive)
|
||||
continue;
|
||||
|
||||
if(verbose)
|
||||
table.AddRow(kvp.Value.Id.ToString(), Markup.Escape(kvp.Value.Name));
|
||||
table.AddRow(archive.Id.ToString(), Markup.Escape(archive.Name));
|
||||
else
|
||||
table.AddRow(Markup.Escape(kvp.Value.Name));
|
||||
table.AddRow(Markup.Escape(archive.Name));
|
||||
}
|
||||
|
||||
AnsiConsole.Write(table);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user