Table of Contents

Class NodeModelBase

Namespace
The.Model.Editor
Assembly
Instagile.Model.dll

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

root AppNodeModel
id Guid
update Action<IEvent[]>
factory EventFactory
generateTagChangeEvent Func<string, string, IEvent>

Fields

Factory

protected readonly EventFactory Factory

Field Value

EventFactory

Properties

AllEntities

public IEnumerable<EntityNodeModel> AllEntities { get; }

Property Value

IEnumerable<EntityNodeModel>

Children

public ObservableCollection<NodeModelBase> Children { get; }

Property Value

ObservableCollection<NodeModelBase>

Commands

public abstract ObservableCollection<EditorCommand> Commands { get; }

Property Value

ObservableCollection<EditorCommand>

DummyTags

public IProperty<TagsModel> DummyTags { get; protected set; }

Property Value

IProperty<TagsModel>

EventDescriptions

public IProperty<IList<EventModel>> EventDescriptions { get; }

Property Value

IProperty<IList<EventModel>>

FilteredChildren

public IEnumerable<NodeModelBase> FilteredChildren { get; }

Property Value

IEnumerable<NodeModelBase>

FocusName

public IProperty<bool> FocusName { get; }

Property Value

IProperty<bool>

ID

public Guid ID { get; }

Property Value

Guid

IsCutPending

public IProperty<bool> IsCutPending { get; }

Property Value

IProperty<bool>

IsExpanded

public IProperty<bool> IsExpanded { get; }

Property Value

IProperty<bool>

IsFiltered

public IProperty<bool> IsFiltered { get; }

Property Value

IProperty<bool>

IsLegacy

public abstract IElement<bool> IsLegacy { get; }

Property Value

IElement<bool>

IsLocked

public virtual bool IsLocked { get; }

Property Value

bool

Name

public abstract IElement<string> Name { get; }

Property Value

IElement<string>

RootNode

public virtual AppNodeModel RootNode { get; }

Property Value

AppNodeModel

Tags

public TagsModel Tags { get; protected set; }

Property Value

TagsModel

Update

public Action<IEvent[]> Update { get; }

Property Value

Action<IEvent[]>

UseFilter

public bool UseFilter { get; set; }

Property Value

bool

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

eventModel EventModel

ContainsText(string)

public virtual bool ContainsText(string text)

Parameters

text string

Returns

bool

DFS()

public IEnumerable<NodeModelBase> DFS()

Returns

IEnumerable<NodeModelBase>

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

generateChangeEvents Func<T, IEvent[]>

Returns

IProperty<T>

Type Parameters

T

Prop<T>(Func<T, IEvent>)

protected IProperty<T?> Prop<T>(Func<T, IEvent> generateChangeEvent) where T : class

Parameters

generateChangeEvent Func<T, IEvent>

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

label string
generateDoc Func<T, string>

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

label string
generateChangeEvents Func<T, IEvent[]>
generateDoc Func<T, string>

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

label string
generateChangeEvents Func<T, IEvent[]>
initialValue T
generateDoc Func<T, string>

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

label string
generateChangeEvent Func<T, IEvent>
generateDoc Func<T, string>

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

label string
generateChangeEvent Func<T, IEvent>
initialValue T
generateDoc Func<T, string>

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

label string
initialValue T
generateDoc Func<T, string>

Returns

IElement<T>

Type Parameters

T

Prop<T>(T)

protected IProperty<T> Prop<T>(T initialValue)

Parameters

initialValue T

Returns

IProperty<T>

Type Parameters

T

RaisePropertyChanged(string)

protected void RaisePropertyChanged(string propertyName)

Parameters

propertyName string

RemoveEventDescription(EventModel)

Remove an event description from this node's event history (for undo)

public void RemoveEventDescription(EventModel eventModel)

Parameters

eventModel EventModel

Events

PropertyChanged

public event PropertyChangedEventHandler? PropertyChanged

Event Type

PropertyChangedEventHandler