mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 20:06:33 +00:00
Plugins - Load features by their info before enabling plugins
General - Added missing XML comments
This commit is contained in:
1 parent
fa26e6b7da
commit
d5d1211649
24 files changed
+241
-180
No files matched your search
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Artemis.Core;
|
||||
using Artemis.Core.DeviceProviders;
|
||||
using Artemis.Core.Services;
|
||||
using Artemis.UI.Ninject.Factories;
|
||||
@@ -27,9 +28,8 @@ namespace Artemis.UI.Screens.StartupWizard.Steps
|
||||
Items.Clear();
|
||||
|
||||
// _pluginManagementService.GetFeaturesOfType<>() will only give us enabled features so lets get all of them this way
|
||||
IEnumerable<DeviceProvider> features = _pluginManagementService.GetAllPlugins()
|
||||
.SelectMany(p => p.Features.Where(f => f is DeviceProvider))
|
||||
.Cast<DeviceProvider>()
|
||||
IEnumerable<PluginFeatureInfo> features = _pluginManagementService.GetAllPlugins()
|
||||
.SelectMany(p => p.Features.Where(f => typeof(DeviceProvider).IsAssignableFrom(f.FeatureType)))
|
||||
.OrderBy(d => d.GetType().Name);
|
||||
Items.AddRange(features.Select(d => _settingsVmFactory.CreatePluginFeatureViewModel(d)));
|
||||
|
||||
|
||||
Reference in new issue
Block a user