/// <summary> /// Gets indexes for all nodes in the inner. /// </summary> public virtual ReadOnlyBrowsingListNodeIndexList AllIndexes() { ReadOnlyBrowsingListNodeIndexList Result = CreateListNodeIndexList(); foreach (IReadOnlyPlaceholderNodeState NodeState in StateList) { IReadOnlyBrowsingListNodeIndex ParentIndex = NodeState.ParentIndex as IReadOnlyBrowsingListNodeIndex; Debug.Assert(ParentIndex != null); Result.Add(ParentIndex); } return(Result); }
/// <summary> /// Initializes a newly created state for a node in the inner. /// </summary> /// <param name="nodeIndex">Index of the node.</param> /// <returns>The created node state.</returns> private protected virtual IReadOnlyNodeState InitChildState(IReadOnlyBrowsingListNodeIndex nodeIndex) { Debug.Assert(nodeIndex.PropertyName == PropertyName); int Index = ((TIndex)nodeIndex).Index; Debug.Assert(Index == StateList.Count); IReadOnlyPlaceholderNodeState State = CreateNodeState(nodeIndex); InsertInStateList(Index, State); return(State); }
private protected virtual IReadOnlyIndexCollection BrowseNodeList(IReadOnlyBrowseContext browseNodeContext, INode node, string propertyName, IReadOnlyList <INode> childNodeList) { Debug.Assert(!string.IsNullOrEmpty(propertyName)); IReadOnlyBrowsingListNodeIndexList NodeIndexList = CreateBrowsingListNodeIndexList(); for (int Index = 0; Index < childNodeList.Count; Index++) { INode ChildNode = childNodeList[Index]; Debug.Assert(ChildNode != null); IReadOnlyBrowsingListNodeIndex NewNodeIndex = CreateListNodeIndex(browseNodeContext, node, propertyName, ChildNode, Index); NodeIndexList.Add(NewNodeIndex); } return(CreateListIndexCollection(browseNodeContext, propertyName, NodeIndexList)); }
bool ICollection <IReadOnlyBrowsingListNodeIndex> .Remove(IReadOnlyBrowsingListNodeIndex item) { return(Remove((ILayoutBrowsingListNodeIndex)item)); }
bool ICollection <IReadOnlyBrowsingListNodeIndex> .Contains(IReadOnlyBrowsingListNodeIndex value) { return(Contains((ILayoutBrowsingListNodeIndex)value)); }
void ICollection <IReadOnlyBrowsingListNodeIndex> .Add(IReadOnlyBrowsingListNodeIndex item) { Add((ILayoutBrowsingListNodeIndex)item); }
void IList <IReadOnlyBrowsingListNodeIndex> .Insert(int index, IReadOnlyBrowsingListNodeIndex item) { Insert(index, (ILayoutBrowsingListNodeIndex)item); }
int IList <IReadOnlyBrowsingListNodeIndex> .IndexOf(IReadOnlyBrowsingListNodeIndex value) { return(IndexOf((ILayoutBrowsingListNodeIndex)value)); }
void ICollection <IReadOnlyBrowsingListNodeIndex> .Add(IReadOnlyBrowsingListNodeIndex item) { Add((IWriteableBrowsingListNodeIndex)item); }
void IList <IReadOnlyBrowsingListNodeIndex> .Insert(int index, IReadOnlyBrowsingListNodeIndex item) { Insert(index, (IWriteableBrowsingListNodeIndex)item); }
int IList <IReadOnlyBrowsingListNodeIndex> .IndexOf(IReadOnlyBrowsingListNodeIndex value) { return(IndexOf((IWriteableBrowsingListNodeIndex)value)); }