Show / Hide Table of Contents

Class TreeNodeCollection<T>

Class representing a collection of tree nodes.

Inheritance
System.Object
System.Collections.ObjectModel.Collection<T><ITreeNode<T><T>>
TreeNodeCollection<T>
Inherited Members
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.System.Collections.IList.get_Item(System.Int32)
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.Clear()
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.ClearItems()
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.Contains(Extend.ITreeNode<T>)
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.CopyTo(Extend.ITreeNode<T>[], System.Int32)
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.GetEnumerator()
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.IndexOf(Extend.ITreeNode<T>)
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.Insert(System.Int32, Extend.ITreeNode<T>)
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.InsertItem(System.Int32, Extend.ITreeNode<T>)
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.RemoveAt(System.Int32)
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.RemoveItem(System.Int32)
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.SetItem(System.Int32, Extend.ITreeNode<T>)
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.System.Collections.IList.Add(System.Object)
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.System.Collections.IList.Contains(System.Object)
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.System.Collections.IList.IndexOf(System.Object)
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.System.Collections.IList.Remove(System.Object)
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.Count
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.Item[System.Int32]
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.Items
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.System.Collections.Generic.ICollection<Extend.ITreeNode<T>>.IsReadOnly
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.System.Collections.ICollection.IsSynchronized
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.System.Collections.ICollection.SyncRoot
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.System.Collections.IList.IsFixedSize
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.System.Collections.IList.IsReadOnly
System.Collections.ObjectModel.Collection<Extend.ITreeNode<T>>.System.Collections.IList.Item[System.Int32]
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace:Extend
Assembly:Extend.dll
Syntax
public class TreeNodeCollection<T> : Collection<ITreeNode<T>>, IList<ITreeNode<T>>, IReadOnlyList<ITreeNode<T>>, IReadOnlyCollection<ITreeNode<T>>, IList, ICollection, ITreeNodeCollection<T>, ICollection<ITreeNode<T>>, IEnumerable<ITreeNode<T>>, IEnumerable
Type Parameters
Name Description
T The type of the value of the tree nodes.

Constructors

| Improve this Doc View Source

TreeNodeCollection(ITreeNode<T>)

Initialize a new instance of the TreeNodeCollection<T> class.

Declaration
public TreeNodeCollection(ITreeNode<T> parent)
Parameters
Type Name Description
ITreeNode<T><T> parent

The parent of the node.

Properties

| Improve this Doc View Source

Parent

Gets the parent of the collection.

Declaration
public ITreeNode<T> Parent { get; set; }
Property Value
Type Description
ITreeNode<T><T>

The parent of the collection.

Implements
ITreeNodeCollection<T>.Parent
Exceptions
Type Condition
System.ArgumentNullException

Parent can not be null.

Methods

| Improve this Doc View Source

Add(T)

Adds the given value as new node to the list and sets it's parent to the parent of the list.

Declaration
public ITreeNode<T> Add(T value)
Parameters
Type Name Description
T value

The value to add.

Returns
Type Description
ITreeNode<T><T>

Returns the new created node.

Implements
ITreeNodeCollection<T>.Add(T)
| Improve this Doc View Source

Add(ITreeNode<T>)

Adds the given item to the list and sets it's parent to the parent of the list.

Declaration
public void Add(ITreeNode<T> item)
Parameters
Type Name Description
ITreeNode<T><T> item

The item to add.

Implements
System.Collections.Generic.ICollection<T>.Add(T)
Exceptions
Type Condition
System.ArgumentNullException

item can not be null.

| Improve this Doc View Source

Add(ITreeNode<T>, Boolean)

Adds the given item to the list and sets it's parent to the parent of the list.

Declaration
public void Add(ITreeNode<T> item, bool setParent)
Parameters
Type Name Description
ITreeNode<T><T> item

The item to add.

System.Boolean setParent

A value indicating weather the parent of the given item should be set to the parent of the collection or not.

Implements
ITreeNodeCollection<T>.Add(ITreeNode<T>, Boolean)
Exceptions
Type Condition
System.ArgumentNullException

item can not be null.

| Improve this Doc View Source

DetachFromParent()

Detaches the collection and all it's items form it's current parent.

Declaration
public void DetachFromParent()
Implements
ITreeNodeCollection<T>.DetachFromParent()
| Improve this Doc View Source

Remove(ITreeNode<T>)

Removes the given item form the list and sets it's parent to null.

Declaration
public bool Remove(ITreeNode<T> item)
Parameters
Type Name Description
ITreeNode<T><T> item

The item to remove.

Returns
Type Description
System.Boolean

true if item is successfully removed; otherwise, false. This method also returns false if item was not found in the original System.Collections.ObjectModel.Collection<T>.

Implements
System.Collections.Generic.ICollection<T>.Remove(T)
Exceptions
Type Condition
System.ArgumentNullException

item can not be null.

| Improve this Doc View Source

Remove(ITreeNode<T>, Boolean)

Removes the given item form the list and sets it's parent to null.

Declaration
public bool Remove(ITreeNode<T> item, bool setParent)
Parameters
Type Name Description
ITreeNode<T><T> item

The item to remove.

System.Boolean setParent

A value indicating whether the parent of the item should get set to null or not.

Returns
Type Description
System.Boolean

true if item is successfully removed; otherwise, false. This method also returns false if item was not found in the original System.Collections.ObjectModel.Collection<T>.

Implements
ITreeNodeCollection<T>.Remove(ITreeNode<T>, Boolean)
Exceptions
Type Condition
System.ArgumentNullException

item can not be null.

| Improve this Doc View Source

ToString()

Returns a string that represents the current object.

Declaration
public override string ToString()
Returns
Type Description
System.String

A string that represents the current object.

Overrides
System.Object.ToString()

Extension Methods

IEnumerableTEx.Intersect<TSource, TKey>(IEnumerable<TSource>, IEnumerable<TSource>, Func<TSource, TKey>, IEqualityComparer<TKey>)
IEnumerableTEx.GetEqualItemsFromStart<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>)
IEnumerableTEx.Except<TSource, TKey>(IEnumerable<TSource>, IEnumerable<TSource>, Func<TSource, TKey>, IEqualityComparer<TKey>)
IEnumerableTEx.Partition<T>(IEnumerable<T>, Int32)
IEnumerableTEx.WithIndex<T>(IEnumerable<T>)
IEnumerableTEx.Prepend<T>(IEnumerable<T>, T)
IEnumerableTEx.Append<T>(IEnumerable<T>, T)
IEnumerableTEx.GetRandomItem<T>(IEnumerable<T>)
IEnumerableTEx.WhereNot<T>(IEnumerable<T>, ISpecification<T>)
IEnumerableTEx.Where<T>(IEnumerable<T>, ISpecification<T>)
IEnumerableTEx.SpecificationForItems<T>(IEnumerable<T>, Func<T, Boolean>, String)
IEnumerableTEx.EnsureNotNull<T>(IEnumerable<T>)
IEnumerableTEx.IsNullOrEmpty<T>(IEnumerable<T>)
IEnumerableTEx.ContainsAll<T>(IEnumerable<T>, T[])
IEnumerableTEx.ContainsAll<T>(IEnumerable<T>, IEnumerable<T>)
IEnumerableTEx.ContainsAny<T>(IEnumerable<T>, T[])
IEnumerableTEx.ContainsAny<T>(IEnumerable<T>, IEnumerable<T>)
IEnumerableTEx.ForEach<T>(IEnumerable<T>, Action<T>)
IEnumerableTEx.ForEach<T>(IEnumerable<T>, Action<T, Int32>)
IEnumerableTEx.ForEachReverse<T>(IEnumerable<T>, Action<T>)
IEnumerableTEx.NotAny<T>(IEnumerable<T>)
IEnumerableTEx.NotAny<T>(IEnumerable<T>, Func<T, Boolean>)
IEnumerableTEx.AnyAndNotNull<T>(IEnumerable<T>)
IEnumerableTEx.AnyAndNotNull<T>(IEnumerable<T>, Func<T, Boolean>)
IEnumerableTEx.StringJoin<T>(IEnumerable<T>, String)
IEnumerableTEx.StringJoin<T>(IEnumerable<T>, Func<T, String>, String)
IEnumerableTEx.WhereIf<T>(IEnumerable<T>, Boolean, Func<T, Boolean>)
IEnumerableTEx.WhereIf<T>(IEnumerable<T>, Boolean, Func<T, Int32, Boolean>)
IEnumerableTEx.Randomize<T>(IEnumerable<T>)
IEnumerableTEx.Distinct<T, TKey>(IEnumerable<T>, Func<T, TKey>)
IEnumerableTEx.ToObservableCollection<T>(IEnumerable<T>)
IEnumerableTEx.Many<T>(IEnumerable<T>, Func<T, Boolean>)
IEnumerableTEx.Many<T>(IEnumerable<T>)
IEnumerableTEx.MinimumOf<T>(IEnumerable<T>, Int32, Func<T, Boolean>)
IEnumerableTEx.MinimumOf<T>(IEnumerable<T>, Int32)
IEnumerableTEx.TakeUntil<T>(IEnumerable<T>, Func<T, Boolean>)
ObjectEx.SatisfiesWithMessages<T>(T, ISpecification<T>)
ObjectEx.Specification<T>(T, Func<T, Boolean>, String)
ObjectEx.GetNameChain<TObject, TMember>(TObject, Expression<Func<TObject, TMember>>)
ObjectEx.GetNameChain<TObject, TMember>(TObject, Expression<Func<TMember>>)
ObjectEx.Swap<T>(Object, ref T, ref T)
ObjectEx.ToSingleItemArray<T>(T)
ObjectEx.Maximum<TSource>(TSource, TSource[])
ObjectEx.Maximum<TSource, TResult>(TSource, Func<TSource, TResult>, TSource[])
ObjectEx.Minimum<TSource>(TSource, TSource[])
ObjectEx.Minimum<TSource, TResult>(TSource, Func<TSource, TResult>, TSource[])
ObjectEx.Satisfies<T>(T, ISpecification<T>)
ObjectEx.IfNull<T>(T, T)
ObjectEx.ThrowIfNull<TObject>(TObject, Expression<Func<TObject>>, String)
ObjectEx.ThrowIfNull<TObject>(TObject, String, String)
ObjectEx.GetName<TObject, TMember>(TObject, Expression<Func<TObject, TMember>>)
ObjectEx.GetName<TObject, TMember>(TObject, Expression<Func<TMember>>)
ObjectEx.IsNull(Object)
ObjectEx.IsNotNull(Object)
ObjectEx.As<T>(Object)
ObjectEx.Chain<T>(T, Action<T>)
ObjectEx.RefEquals(Object, Object)
ObjectEx.Coalesce<T>(T, T[])
ObjectEx.Coalesce<T>(T, T)
ObjectEx.CoalesceOrDefault<T>(T, T, T[])
ObjectEx.CoalesceOrDefault<T>(T, Func<T>, T[])
ObjectEx.ExecuteSafe<T>(T, Action<T>)
ObjectEx.ExecuteSafe<T, TResult>(T, Func<T, TResult>)
ObjectEx.ToBoolean(Object)
ObjectEx.ToBoolean(Object, IFormatProvider)
ObjectEx.ToByte(Object)
ObjectEx.ToByte(Object, IFormatProvider)
ObjectEx.ToChar(Object)
ObjectEx.ToChar(Object, IFormatProvider)
ObjectEx.ToDateTime(Object)
ObjectEx.ToDateTime(Object, IFormatProvider)
ObjectEx.ToDecimal(Object)
ObjectEx.ToDecimal(Object, IFormatProvider)
ObjectEx.ToDouble(Object)
ObjectEx.ToDouble(Object, IFormatProvider)
ObjectEx.ToInt32(Object)
ObjectEx.ToInt32(Object, IFormatProvider)
ObjectEx.ToInt16(Object)
ObjectEx.ToInt16(Object, IFormatProvider)
ObjectEx.ToInt64(Object)
ObjectEx.ToInt64(Object, IFormatProvider)
ObjectEx.IsIn<T>(T, T[])
ObjectEx.IsIn<T>(T, IEnumerable<T>)
ObjectEx.IsNotIn<T>(T, T[])
ObjectEx.IsNotIn<T>(T, IEnumerable<T>)
ObjectEx.IsDefault<T>(T)
CollectionTEx.AddIf<T>(ICollection<T>, Func<T, Boolean>, T)
CollectionTEx.AddIfNotContains<T>(ICollection<T>, T)
CollectionTEx.AddRange<T>(ICollection<T>, T[])
CollectionTEx.AddRange<T>(ICollection<T>, IEnumerable<T>)
CollectionTEx.AddRangeIf<T>(ICollection<T>, Func<T, Boolean>, T[])
CollectionTEx.AddRangeIf<T>(ICollection<T>, Func<T, Boolean>, IEnumerable<T>)
CollectionTEx.AddRangeIfNotContains<T>(ICollection<T>, T[])
CollectionTEx.AddRangeIfNotContains<T>(ICollection<T>, IEnumerable<T>)
CollectionTEx.RemoveIf<T>(ICollection<T>, T, Func<T, Boolean>)
CollectionTEx.RemoveRange<T>(ICollection<T>, T[])
CollectionTEx.RemoveRange<T>(ICollection<T>, IEnumerable<T>)
CollectionTEx.RemoveRangeIf<T>(ICollection<T>, Func<T, Boolean>, T[])
CollectionTEx.RemoveRangeIf<T>(ICollection<T>, Func<T, Boolean>, IEnumerable<T>)
DecimalEx.Sum<TSource>(TSource, Func<TSource, Decimal>, TSource[])
DecimalEx.Sum<TSource>(TSource, Func<TSource, Nullable<Decimal>>, TSource[])
DoubleEx.Sum<TSource>(TSource, Func<TSource, Double>, TSource[])
DoubleEx.Sum<TSource>(TSource, Func<TSource, Nullable<Double>>, TSource[])
Int32Ex.Sum<TSource>(TSource, Func<TSource, Int32>, TSource[])
Int32Ex.Sum<TSource>(TSource, Func<TSource, Nullable<Int32>>, TSource[])
Int64Ex.Sum<TSource>(TSource, Func<TSource, Int64>, TSource[])
Int64Ex.Sum<TSource>(TSource, Func<TSource, Nullable<Int64>>, TSource[])
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2016 Microsoft
Generated by DocFX