Interface IAbstractContainerNode
A node in the document that can contain other nodes.
Inherited Members
Namespace: Sdl.DesktopEditor.EditorApi
Assembly: Sdl.DesktopEditor.EditorApi.dll
Syntax
public interface IAbstractContainerNode : INode, IAbstractNode, ITreeNode<IAbstractNode, IAbstractContainerNode>, IEnumerable<IAbstractNode>, IEnumerable
Remarks
A container node always has a start node and an end node. These cannot be deleted or moved. (Any attempt to do so will raise an exception.) Editing operations that would delete start or end nodes in the editor instead turn these into "ghost" nodes.
The container node implements the IEnumerable interface, so you can iterate
over its content directly using a foreach
loop.
The start and end nodes appear in the collection, and they can also be accessed directly through the StartNode and EndNode properties.
Properties
EndNode
Direct access to the node acting as the end of the container.
Declaration
IStartEndNode EndNode { get; }
Property Value
Type | Description |
---|---|
IStartEndNode |
StartNode
Direct access to the node acting as start of the container.
Declaration
IStartEndNode StartNode { get; }
Property Value
Type | Description |
---|---|
IStartEndNode |
Methods
Find(Predicate<INode>, Boolean)
Locate the first node that matches the predicate.
Declaration
INode Find(Predicate<INode> match, bool allSubNodes)
Parameters
Type | Name | Description |
---|---|---|
System.Predicate<INode> | match | condition used to evaluate nodes |
System.Boolean | allSubNodes | if |
Returns
Type | Description |
---|---|
INode | the first node that matches the predicate |
FindAllNodes(Predicate<IAbstractNode>, Boolean)
Find all child nodes that match the specified predicate.
Declaration
List<IAbstractNode> FindAllNodes(Predicate<IAbstractNode> match, bool searchAllSubNodes)
Parameters
Type | Name | Description |
---|---|---|
System.Predicate<IAbstractNode> | match | condition used to evaluate nodes |
System.Boolean | searchAllSubNodes | if |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<IAbstractNode> | A list containing all child nodes for which the predicate evaluated to true |
FindContentNode(Predicate<IAbstractContentNode>, Boolean)
Locate the first content node that matches the predicate.
Declaration
IAbstractContentNode FindContentNode(Predicate<IAbstractContentNode> match, bool searchAllSubNodes)
Parameters
Type | Name | Description |
---|---|---|
System.Predicate<IAbstractContentNode> | match | condition used to evaluate nodes |
System.Boolean | searchAllSubNodes | if |
Returns
Type | Description |
---|---|
IAbstractContentNode | the first node that matches the predicate |