mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Plugins - Gave each plugin its own child Ninject kernel
Plugins - Added support for validation in VMs
This commit is contained in:
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();
|
||||
|
||||
Reference in new issue
Block a user