ILogicalTreeNode Interface
Provides the base requirements for a node that needs to be part of a logical tree.
public interface ILogicalTreeNode
Properties
Children
Gets the collection of child objects.
Parent
Gets or sets the object that is parent to this object.
ILogicalTreeNode Parent { get; set; }
Property Value
- ILogicalTreeNode:
The object that is parent to this object.
Remarks
The setter of this property is reserved for internal use only.
Methods
FindAncestor(Type)
Loops up the parent chain to locate an ancestor of the specified Type
.
object FindAncestor(Type type)
Parameter | Type | Description |
---|---|---|
type | Type | The |
Returns
GetCommonAncestor(ILogicalTreeNode)
Gets the common ancestor of the two object.
ILogicalTreeNode GetCommonAncestor(ILogicalTreeNode value)
Parameter | Type | Description |
---|---|---|
value | ILogicalTreeNode | The ILogicalTreeNode to compare. |
Returns
- ILogicalTreeNode:
The ILogicalTreeNode that is a common ancestor of both objects; otherwise
null
.
IsAncestorOf(ILogicalTreeNode)
Gets whether the object is an ancestor to the specified object.
bool IsAncestorOf(ILogicalTreeNode value)
Parameter | Type | Description |
---|---|---|
value | ILogicalTreeNode | The ILogicalTreeNode to compare. |
Returns
- bool:
true
if the object is an ancestor of the specified object; otherwise,false
.
IsDescendantOf(ILogicalTreeNode)
Gets whether the object is a descendant of the specified object.
bool IsDescendantOf(ILogicalTreeNode value)
Parameter | Type | Description |
---|---|---|
value | ILogicalTreeNode | The ILogicalTreeNode to compare. |
Returns
- bool:
true
if the object is a descendant of the specified object; otherwise,false
.