Class NodeModelBase
base class for viewmodels in the master-detail tree
public abstract class NodeModelBase : INotifyPropertyChanged
- Inheritance
-
NodeModelBase
- Implements
- Derived
- Inherited Members
Constructors
NodeModelBase(AppNodeModel, Guid, Action<IEvent[]>, EventFactory, Func<string, string?, IEvent>)
protected NodeModelBase(AppNodeModel root, Guid id, Action<IEvent[]> update, EventFactory factory, Func<string, string?, IEvent> generateTagChangeEvent)
Parameters
rootAppNodeModelidGuidupdateAction<IEvent[]>factoryEventFactorygenerateTagChangeEventFunc<string, string, IEvent>
Fields
Factory
protected readonly EventFactory Factory
Field Value
Properties
AllEntities
public IEnumerable<EntityNodeModel> AllEntities { get; }
Property Value
Children
public ObservableCollection<NodeModelBase> Children { get; }
Property Value
Commands
public abstract ObservableCollection<EditorCommand> Commands { get; }
Property Value
DummyTags
public IProperty<TagsModel> DummyTags { get; protected set; }
Property Value
EventDescriptions
public IProperty<IList<EventModel>> EventDescriptions { get; }
Property Value
FilteredChildren
public IEnumerable<NodeModelBase> FilteredChildren { get; }
Property Value
FocusName
public IProperty<bool> FocusName { get; }
Property Value
ID
public Guid ID { get; }
Property Value
IsCutPending
public IProperty<bool> IsCutPending { get; }
Property Value
IsExpanded
public IProperty<bool> IsExpanded { get; }
Property Value
IsFiltered
public IProperty<bool> IsFiltered { get; }
Property Value
IsLegacy
public abstract IElement<bool> IsLegacy { get; }
Property Value
IsLocked
public virtual bool IsLocked { get; }
Property Value
Name
public abstract IElement<string> Name { get; }
Property Value
RootNode
public virtual AppNodeModel RootNode { get; }
Property Value
Tags
public TagsModel Tags { get; protected set; }
Property Value
Update
public Action<IEvent[]> Update { get; }
Property Value
UseFilter
public bool UseFilter { get; set; }
Property Value
Methods
AddClipboardCommands()
append the standard Cut/Copy/Paste commands behind a separator; called at the end of each subclass constructor
protected void AddClipboardCommands()
Remarks
commands that don't apply to the node kind hide themselves via IsAvailable, so this is safe to call on every node
AddEventDescription(EventModel)
Add an event description to this node's event history (prepends to list)
public void AddEventDescription(EventModel eventModel)
Parameters
eventModelEventModel
ContainsText(string)
public virtual bool ContainsText(string text)
Parameters
textstring
Returns
DFS()
public IEnumerable<NodeModelBase> DFS()
Returns
Prop<T>()
protected IProperty<T?> Prop<T>()
Returns
- IProperty<T>
Type Parameters
T
Prop<T>(Func<T?, IEvent[]>)
protected IProperty<T?> Prop<T>(Func<T?, IEvent[]> generateChangeEvents)
Parameters
Returns
- IProperty<T>
Type Parameters
T
Prop<T>(Func<T, IEvent>)
protected IProperty<T?> Prop<T>(Func<T, IEvent> generateChangeEvent) where T : class
Parameters
Returns
- IProperty<T>
Type Parameters
T
Prop<T>(string, Func<T?, string>?)
protected IElement<T?> Prop<T>(string label, Func<T?, string>? generateDoc = null)
Parameters
Returns
- IElement<T>
Type Parameters
T
Prop<T>(string, Func<T, IEvent[]>, Func<T, string?>?)
protected IElement<T?> Prop<T>(string label, Func<T, IEvent[]> generateChangeEvents, Func<T, string?>? generateDoc = null)
Parameters
Returns
- IElement<T>
Type Parameters
T
Prop<T>(string, Func<T, IEvent[]>, T, Func<T, string?>?)
protected IElement<T> Prop<T>(string label, Func<T, IEvent[]> generateChangeEvents, T initialValue, Func<T, string?>? generateDoc = null)
Parameters
Returns
- IElement<T>
Type Parameters
T
Prop<T>(string, Func<T, IEvent>, Func<T, string?>?)
protected IElement<T?> Prop<T>(string label, Func<T, IEvent> generateChangeEvent, Func<T, string?>? generateDoc = null)
Parameters
Returns
- IElement<T>
Type Parameters
T
Prop<T>(string, Func<T, IEvent>, T, Func<T, string?>?)
protected IElement<T> Prop<T>(string label, Func<T, IEvent> generateChangeEvent, T initialValue, Func<T, string?>? generateDoc = null)
Parameters
Returns
- IElement<T>
Type Parameters
T
Prop<T>(string, T, Func<T?, string>?)
protected IElement<T> Prop<T>(string label, T initialValue, Func<T?, string>? generateDoc = null)
Parameters
Returns
- IElement<T>
Type Parameters
T
Prop<T>(T)
protected IProperty<T> Prop<T>(T initialValue)
Parameters
initialValueT
Returns
- IProperty<T>
Type Parameters
T
RaisePropertyChanged(string)
protected void RaisePropertyChanged(string propertyName)
Parameters
propertyNamestring
RemoveEventDescription(EventModel)
Remove an event description from this node's event history (for undo)
public void RemoveEventDescription(EventModel eventModel)
Parameters
eventModelEventModel
Events
PropertyChanged
public event PropertyChangedEventHandler? PropertyChanged