Interface IAbstractContainerNode
A node in the document that can contain other nodes.
Inherited Members
Namespace: SdlSdl.DesktopEditorEditorApi
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>, bool)
Locate the first node that matches the predicate.
Declaration
INode Find(Predicate<INode> match, bool allSubNodes)
Parameters
Type | Name | Description |
---|---|---|
PredicateINode | match | condition used to evaluate nodes |
bool | allSubNodes | if |
Returns
Type | Description |
---|---|
INode | the first node that matches the predicate |
FindAllNodes(Predicate<IAbstractNode>, bool)
Find all child nodes that match the specified predicate.
Declaration
List<IAbstractNode> FindAllNodes(Predicate<IAbstractNode> match, bool searchAllSubNodes)
Parameters
Type | Name | Description |
---|---|---|
PredicateIAbstractNode | match | condition used to evaluate nodes |
bool | searchAllSubNodes | if |
Returns
Type | Description |
---|---|
ListIAbstractNode | A list containing all child nodes for which the predicate evaluated to true |
FindContentNode(Predicate<IAbstractContentNode>, bool)
Locate the first content node that matches the predicate.
Declaration
IAbstractContentNode FindContentNode(Predicate<IAbstractContentNode> match, bool searchAllSubNodes)
Parameters
Type | Name | Description |
---|---|---|
PredicateIAbstractContentNode | match | condition used to evaluate nodes |
bool | searchAllSubNodes | if |
Returns
Type | Description |
---|---|
IAbstractContentNode | the first node that matches the predicate |