Table of Contents

Class EntityNodeModel

Namespace
The.Model.Editor
Assembly
Instagile.Model.dll
public sealed class EntityNodeModel : NodeModelBase, INotifyPropertyChanged, IOptionModel<Guid>, IOptionModel
Inheritance
EntityNodeModel
Implements
Inherited Members

Constructors

EntityNodeModel(AppNodeModel, Guid, Action<IEvent[]>, EventFactory, bool, IEnumerable<IFeature>, string, IOptionModel<EntityCalculationMode>, IOptionModel<Tuple<Guid, PropertyType>?>, IOptionModel<SortType?>)

public EntityNodeModel(AppNodeModel root, Guid id, Action<IEvent[]> update, EventFactory factory, bool useSectionNodes, IEnumerable<IFeature> features, string initialName, IOptionModel<EntityCalculationMode> initialTextCalculation, IOptionModel<Tuple<Guid, PropertyType>?> initialSortBy, IOptionModel<SortType?> initialSortDirection)

Parameters

root AppNodeModel
id Guid
update Action<IEvent[]>
factory EventFactory
useSectionNodes bool
features IEnumerable<IFeature>
initialName string
initialTextCalculation IOptionModel<EntityCalculationMode>
initialSortBy IOptionModel<Tuple<Guid, PropertyType>>
initialSortDirection IOptionModel<SortType?>

Fields

NewEntityName

public const string NewEntityName = "UntitledEntity"

Field Value

string

Properties

CaptionOverride

public IElement<string?> CaptionOverride { get; }

Property Value

IElement<string>

Commands

public override ObservableCollection<EditorCommand> Commands { get; }

Property Value

ObservableCollection<EditorCommand>

CopyEntityCommand

public EditorCommand CopyEntityCommand { get; }

Property Value

EditorCommand

DiagramNumbers

public IElement<string?> DiagramNumbers { get; }

Property Value

IElement<string>

FlagsDoc

public MultiDoc FlagsDoc { get; }

Property Value

MultiDoc

FormatOverride

public IElement<string?> FormatOverride { get; }

Property Value

IElement<string>

IsAbstract

public IElement<bool> IsAbstract { get; }

Property Value

IElement<bool>

IsAudited

public IElement<bool> IsAudited { get; }

Property Value

IElement<bool>

IsLegacy

public override IElement<bool> IsLegacy { get; }

Property Value

IElement<bool>

IsLocked

public override bool IsLocked { get; }

Property Value

bool

IsReferenceData

public IElement<bool> IsReferenceData { get; }

Property Value

IElement<bool>

IsTopLevel

public IElement<bool> IsTopLevel { get; }

Property Value

IElement<bool>

IsTransient

public IElement<bool> IsTransient { get; }

Property Value

IElement<bool>

ModelID

public string ModelID { get; }

Property Value

string

Name

public override IElement<string> Name { get; }

Property Value

IElement<string>

PluralCaptionOverride

public IElement<string?> PluralCaptionOverride { get; }

Property Value

IElement<string>

PluralOverride

public IElement<string?> PluralOverride { get; }

Property Value

IElement<string>

Properties

public IEnumerable<PropertyNodeModel> Properties { get; }

Property Value

IEnumerable<PropertyNodeModel>

Sections

public IEnumerable<SectionNodeModel> Sections { get; }

Property Value

IEnumerable<SectionNodeModel>

ShowIsAbstract

public bool ShowIsAbstract { get; }

Property Value

bool

ShowTextCalculation

public bool ShowTextCalculation { get; }

Property Value

bool

SortBy

public IElement<IOptionModel<Tuple<Guid, PropertyType>?>> SortBy { get; }

Property Value

IElement<IOptionModel<Tuple<Guid, PropertyType>>>

SortByTypes

public ObservableCollection<IOptionModel<Tuple<Guid, PropertyType>?>> SortByTypes { get; }

Property Value

ObservableCollection<IOptionModel<Tuple<Guid, PropertyType>>>

SortDirection

public IElement<IOptionModel<SortType?>> SortDirection { get; }

Property Value

IElement<IOptionModel<SortType?>>

SortDirectionTypes

public IProperty<ObservableCollection<IOptionModel<SortType?>>?> SortDirectionTypes { get; }

Property Value

IProperty<ObservableCollection<IOptionModel<SortType?>>>

SyntaxType

public SyntaxType SyntaxType { get; }

Property Value

SyntaxType

TextCalculation

public IElement<IOptionModel<EntityCalculationMode>> TextCalculation { get; }

Property Value

IElement<IOptionModel<EntityCalculationMode>>

TextCalculationTypes

public IProperty<ObservableCollection<IOptionModel<EntityCalculationMode>>?> TextCalculationTypes { get; }

Property Value

IProperty<ObservableCollection<IOptionModel<EntityCalculationMode>>>

Methods

AddAttribute(IDialogHost)

public Task AddAttribute(IDialogHost host)

Parameters

host IDialogHost

Returns

Task

AppendProp(SectionNodeModel, PropertyNodeModel)

public void AppendProp(SectionNodeModel intoSection, PropertyNodeModel prop)

Parameters

intoSection SectionNodeModel
prop PropertyNodeModel

AppendSection(SectionNodeModel)

public void AppendSection(SectionNodeModel section)

Parameters

section SectionNodeModel

ContainsText(string)

public override bool ContainsText(string text)

Parameters

text string

Returns

bool

GetAbsoluteOrderWithinEntity(PropertyNodeModel)

public int GetAbsoluteOrderWithinEntity(PropertyNodeModel prop)

Parameters

prop PropertyNodeModel

Returns

int

GetRelativeOrderWithinSection(SectionNodeModel, PropertyNodeModel)

public int GetRelativeOrderWithinSection(SectionNodeModel section, PropertyNodeModel prop)

Parameters

section SectionNodeModel
prop PropertyNodeModel

Returns

int

GetSectionOrderWithinEntity(SectionNodeModel)

public int GetSectionOrderWithinEntity(SectionNodeModel section)

Parameters

section SectionNodeModel

Returns

int

InsertProp(SectionNodeModel, int, PropertyNodeModel)

public void InsertProp(SectionNodeModel intoSection, int index, PropertyNodeModel prop)

Parameters

intoSection SectionNodeModel
index int
prop PropertyNodeModel

InsertSection(int, SectionNodeModel)

public void InsertSection(int index, SectionNodeModel section)

Parameters

index int
section SectionNodeModel

JumpTo()

public void JumpTo()

MoveProp(int, PropertyNodeModel)

moves within a single section, though the index is entity-relative

public void MoveProp(int index, PropertyNodeModel prop)

Parameters

index int
prop PropertyNodeModel

Remarks

these Move functions unnecessarily lose selection and reset owner. they could be reimplemented with ObservableCollection.Move, but that, too, removes-and-adds as far as the Selection is concerned...

MoveProp(SectionNodeModel, SectionNodeModel, int, PropertyNodeModel)

moves to within a new section

public void MoveProp(SectionNodeModel fromSection, SectionNodeModel intoSection, int index, PropertyNodeModel prop)

Parameters

fromSection SectionNodeModel
intoSection SectionNodeModel
index int
prop PropertyNodeModel

MoveProp(SectionNodeModel, SectionNodeModel, PropertyNodeModel)

moves to the end of a new section

public void MoveProp(SectionNodeModel fromSection, SectionNodeModel intoSection, PropertyNodeModel prop)

Parameters

fromSection SectionNodeModel
intoSection SectionNodeModel
prop PropertyNodeModel

NameEquals(string)

public bool NameEquals(string compare)

Parameters

compare string

Returns

bool

NameMatches(string)

public bool NameMatches(string compare)

Parameters

compare string

Returns

bool

RecalculatePropertyOrderingAfterSectionsReordered()

public void RecalculatePropertyOrderingAfterSectionsReordered()

RemoveProp(SectionNodeModel, PropertyNodeModel)

public void RemoveProp(SectionNodeModel fromSection, PropertyNodeModel prop)

Parameters

fromSection SectionNodeModel
prop PropertyNodeModel

RemoveSection(SectionNodeModel)

public void RemoveSection(SectionNodeModel section)

Parameters

section SectionNodeModel

ToString()

public override string ToString()

Returns

string

UpdateDummyTags()

public void UpdateDummyTags()