mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Nodes - Properly implemented custom VMs
This commit is contained in:
1 parent
7eadc58bee
commit
61d7f1e1fb
8 files changed
+46
-50
No files matched your search
@@ -51,8 +51,8 @@ namespace Artemis.Core.Services
|
||||
private INode CreateNode(Type nodeType)
|
||||
{
|
||||
INode node = _kernel.Get(nodeType) as INode ?? throw new InvalidOperationException($"Node {nodeType} is not an INode");
|
||||
if (node.CustomViewModelType != null)
|
||||
node.CustomViewModel = _kernel.Get(node.CustomViewModelType);
|
||||
if (node is CustomViewModelNode customViewModelNode)
|
||||
customViewModelNode.BaseCustomViewModel = _kernel.Get(customViewModelNode.CustomViewModelType);
|
||||
return node;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user