Plugins - Gave each plugin its own child Ninject kernel

Plugins - Added support for validation in VMs
This commit is contained in:
Robert committed 2020-09-21 21:05:00 +02:00
1 parent 693ea29600
commit 2547b6a8bf
18 files changed
+132 -36

No files matched your search

@@ -16,6 +16,16 @@ namespace Artemis.Core.LayerBrushes
LayerBrush = layerBrush;
}
/// <summary>
/// Creates a new instance of the <see cref="BrushConfigurationViewModel" /> class with a validator
/// </summary>
/// <param name="layerBrush"></param>
/// <param name="validator"></param>
protected BrushConfigurationViewModel(BaseLayerBrush layerBrush, IModelValidator validator) : base(validator)
{
LayerBrush = layerBrush;
}
/// <summary>
/// Gets the layer brush this view model is associated with
/// </summary>
@@ -62,7 +62,7 @@ namespace Artemis.Core.LayerBrushes
if (layer.LayerBrush != null)
throw new ArtemisCoreException("Layer already has an instantiated layer brush");
var brush = (BaseLayerBrush) CoreService.Kernel.Get(LayerBrushType);
var brush = (BaseLayerBrush) LayerBrushProvider.PluginInfo.Kernel.Get(LayerBrushType);
brush.Layer = layer;
brush.Descriptor = this;
brush.Initialize();