/// <summary> /// Gets indexes for all nodes in the inner. /// </summary> public virtual IReadOnlyBrowsingListNodeIndexList AllIndexes() { IReadOnlyBrowsingListNodeIndexList Result = CreateListNodeIndexList(); foreach (IReadOnlyPlaceholderNodeState NodeState in StateList) { IReadOnlyBrowsingListNodeIndex ParentIndex = NodeState.ParentIndex as IReadOnlyBrowsingListNodeIndex; Debug.Assert(ParentIndex != null); Result.Add(ParentIndex); } return(Result); }
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)); }
/// <summary> /// Creates a IxxxIndexCollection with IxxxBrowsingListNodeIndex objects. /// </summary> private protected override IReadOnlyIndexCollection CreateListIndexCollection(IReadOnlyBrowseContext browseNodeContext, string propertyName, IReadOnlyBrowsingListNodeIndexList nodeIndexList) { ControllerTools.AssertNoOverride(this, typeof(FocusPlaceholderNodeState <IInner>)); return(new FocusIndexCollection <IFocusBrowsingListNodeIndex>(propertyName, (IFocusBrowsingListNodeIndexList)nodeIndexList)); }
/// <summary> /// Creates a IxxxIndexCollection with IxxxBrowsingListNodeIndex objects. /// </summary> private protected override IReadOnlyIndexCollection CreateListIndexCollection(IReadOnlyBrowseContext browseNodeContext, string propertyName, IReadOnlyBrowsingListNodeIndexList nodeIndexList) { ControllerTools.AssertNoOverride(this, typeof(WriteableOptionalNodeState <IInner>)); return(new WriteableIndexCollection <IWriteableBrowsingListNodeIndex>(propertyName, (IWriteableBrowsingListNodeIndexList)nodeIndexList)); }
/// <summary> /// Creates a IxxxIndexCollection with IxxxBrowsingListNodeIndex objects. /// </summary> private protected virtual IReadOnlyIndexCollection CreateListIndexCollection(IReadOnlyBrowseContext browseNodeContext, string propertyName, IReadOnlyBrowsingListNodeIndexList nodeIndexList) { ControllerTools.AssertNoOverride(this, typeof(ReadOnlyNodeState <IInner>)); return(new ReadOnlyIndexCollection <IReadOnlyBrowsingListNodeIndex>(propertyName, nodeIndexList)); }