mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Plugin system] Move filesystems to dependency injection.
This commit is contained in:
@@ -118,17 +118,17 @@ public sealed class PluginsViewModel : ViewModelBase
|
||||
});
|
||||
}
|
||||
|
||||
foreach(Type filesystem in PluginRegister.Singleton.Filesystems.Values)
|
||||
foreach(IFilesystem filesystem in PluginRegister.Singleton.Filesystems.Values)
|
||||
{
|
||||
if(Activator.CreateInstance(filesystem) is not IFilesystem fs)
|
||||
if(filesystem is null)
|
||||
continue;
|
||||
|
||||
Filesystems.Add(new PluginModel
|
||||
{
|
||||
Name = fs.Name,
|
||||
Uuid = fs.Id,
|
||||
Version = Assembly.GetAssembly(filesystem)?.GetName().Version?.ToString(),
|
||||
Author = fs.Author
|
||||
Name = filesystem.Name,
|
||||
Uuid = filesystem.Id,
|
||||
Version = Assembly.GetAssembly(filesystem.GetType())?.GetName().Version?.ToString(),
|
||||
Author = filesystem.Author
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user