/// <summary> /// Modifies the index to address the next position in a list. /// </summary> public virtual void MoveUp() { NodeTreeHelperList.GetLastListIndex(ParentNode, PropertyName, out int LastIndex); Debug.Assert(Index + 1 < LastIndex); Index++; }
/// <summary> /// Initializes a new instance of the <see cref="WriteableInsertionListNodeIndex"/> class. /// </summary> /// <param name="parentNode">Node containing the list.</param> /// <param name="propertyName">Property in <paramref name="parentNode"/> corresponding to the list.</param> /// <param name="node">Inserted node.</param> /// <param name="index">Position where to insert <paramref name="node"/> in the list.</param> public WriteableInsertionListNodeIndex(INode parentNode, string propertyName, INode node, int index) : base(parentNode, propertyName, node) { Debug.Assert(index >= 0); Debug.Assert(NodeTreeHelperList.GetLastListIndex(parentNode, propertyName, out int LastIndex) && index <= LastIndex); Index = index; }