Core - Do not load abstract plugin features

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

No files matched your search

@@ -396,7 +396,7 @@ internal class PluginManagementService : IPluginManagementService
List<Type> featureTypes; List<Type> featureTypes;
try 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) catch (ReflectionTypeLoadException e)
{ {
@@ -1,4 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Reactive.Disposables; using System.Reactive.Disposables;
using System.Reactive.Linq; using System.Reactive.Linq;
@@ -193,7 +194,7 @@ public abstract class PropertyInputViewModel<T> : PropertyInputViewModel
_updating = true; _updating = true;
// Avoid unnecessary UI updates and validator cycles // Avoid unnecessary UI updates and validator cycles
if (Equals(_inputValue, LayerProperty.CurrentValue)) if (EqualityComparer<T>.Default.Equals(_inputValue, LayerProperty.CurrentValue))
return; return;
// Override the input value // Override the input value