using System; using Intromat.Interfaces; using Intromat.Nodes.Code; using Intromat.Views.Editors; using NodeNetwork.Toolkit.ValueNode; using ReactiveUI; using Splat; namespace Intromat.ViewModels.Editors { public class EnumEditorViewModel : ValueEditorViewModel, IExpressionEditor { static EnumEditorViewModel() { Locator.CurrentMutable.Register(() => new EnumEditorView(), typeof(IViewFor)); } public EnumEditorViewModel(Type enumType) { EnumType = enumType; } public Type EnumType { get; } public ERelativeSource RelativeSource { get => ERelativeSource.Custom; set => throw new NotSupportedException(); } public bool HasParentSource => false; public bool HasInputSource => false; public CodeGenPortViewModel CodeGenPort => (CodeGenPortViewModel)Parent.Port; } }