Interface IHasChildren<T>
Indicates this item has children that are all typed to be of the same type
Inherited Members
Namespace: LemonEdge.Utils
Assembly: LemonEdge.Utils.dll
Syntax
public interface IHasChildren<T> : IHasChildren where T : IHasChildren<T>
Type Parameters
Name | Description |
---|---|
T | The item type that implements IHasChildren and that all child items are of |
Properties
Children
List of Children contained within this item
Declaration
IEnumerable<T> Children { get; }
Property Value
Type | Description |
---|---|
IEnumerable<T> |
Parent
Holds a link to the parent item (if there is one) that this item is a child of
Declaration
T Parent { get; }
Property Value
Type | Description |
---|---|
T |
Methods
AddChild(T, bool)
Adds a child item to the collection of Children in this item
Declaration
void AddChild(T item, bool allowDuplicate = false)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to add to this items Children. It can not already have another Parent, and this method will set its Parent to this item itself |
bool | allowDuplicate |
DeleteChild(T)
Removes a child item from the collection of Children in this item
Declaration
void DeleteChild(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to remove from this items Children |