1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-12 13:28:33 +00:00

Core - Do not load abstract plugin features

UI - Replace Equals check with EqualityComparer
This commit is contained in:
Diogo Trindade 2023-05-21 15:33:37 +01:00
parent 26ad9a3385
commit a846bd592e
2 changed files with 3 additions and 2 deletions

View File

@ -396,7 +396,7 @@ internal class PluginManagementService : IPluginManagementService
List<Type> featureTypes;
try
{
featureTypes = plugin.Assembly.GetTypes().Where(t => typeof(PluginFeature).IsAssignableFrom(t)).ToList();
featureTypes = plugin.Assembly.GetTypes().Where(t => typeof(PluginFeature).IsAssignableFrom(t) && !t.IsAbstract).ToList();
}
catch (ReflectionTypeLoadException e)
{

View File

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Reactive.Disposables;
using System.Reactive.Linq;
@ -193,7 +194,7 @@ public abstract class PropertyInputViewModel<T> : PropertyInputViewModel
_updating = true;
// Avoid unnecessary UI updates and validator cycles
if (Equals(_inputValue, LayerProperty.CurrentValue))
if (EqualityComparer<T>.Default.Equals(_inputValue, LayerProperty.CurrentValue))
return;
// Override the input value