mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use Type for writable floppy image plugin list.
This commit is contained in:
Submodule Aaru.CommonTypes updated: 84f759b015...8336bde2df
@@ -85,7 +85,7 @@ public sealed class PluginsViewModel : ViewModelBase
|
||||
{
|
||||
Name = floppyImage.Name,
|
||||
Uuid = floppyImage.Id,
|
||||
Version = Assembly.GetAssembly(floppyImage.GetType())?.GetName().Version?.ToString(),
|
||||
Version = Assembly.GetAssembly(imageType)?.GetName().Version?.ToString(),
|
||||
Author = floppyImage.Author
|
||||
});
|
||||
}
|
||||
@@ -146,14 +146,19 @@ public sealed class PluginsViewModel : ViewModelBase
|
||||
});
|
||||
}
|
||||
|
||||
foreach(IWritableFloppyImage writableFloppyImage in GetPluginBase.Instance.WritableFloppyImages.Values)
|
||||
foreach(Type imageType in GetPluginBase.Instance.WritableFloppyImages.Values)
|
||||
{
|
||||
if(Activator.CreateInstance(imageType) is not IWritableFloppyImage writableFloppyImage)
|
||||
continue;
|
||||
|
||||
WritableFloppyImages.Add(new PluginModel
|
||||
{
|
||||
Name = writableFloppyImage.Name,
|
||||
Uuid = writableFloppyImage.Id,
|
||||
Version = Assembly.GetAssembly(writableFloppyImage.GetType())?.GetName().Version?.ToString(),
|
||||
Version = Assembly.GetAssembly(imageType)?.GetName().Version?.ToString(),
|
||||
Author = writableFloppyImage.Author
|
||||
});
|
||||
}
|
||||
|
||||
foreach(Type baseWritableImageType in GetPluginBase.Instance.WritableImages.Values)
|
||||
{
|
||||
@@ -164,7 +169,7 @@ public sealed class PluginsViewModel : ViewModelBase
|
||||
{
|
||||
Name = writableImage.Name,
|
||||
Uuid = writableImage.Id,
|
||||
Version = Assembly.GetAssembly(writableImage.GetType())?.GetName().Version?.ToString(),
|
||||
Version = Assembly.GetAssembly(baseWritableImageType)?.GetName().Version?.ToString(),
|
||||
Author = writableImage.Author
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user