Class: Base2art.Collections.TopologicallySortedCollection<TKey, TItem>

A collection that sorts things topolocigally. Think of a directed graph, or a dependency tree when looking for example usages.

Inherits

└── System.Object

Implements

System.Collections.Generic.ICollection<TItem>
System.Collections.Generic.IEnumerable<TItem>
System.Collections.IEnumerable

Properties

Count

Gets the number of elements contained in the System.Collections.Generic.ICollection`1.


IsReadOnly

Gets a value indicating whether the System.Collections.Generic.ICollection`1 is read-only.

Methods

Add(TItem)

Adds an item to the System.Collections.Generic.ICollection`1.The System.Collections.Generic.ICollection`1 is read-only.

Parameter Type Info
item TItem The object to add to the System.Collections.Generic.ICollection`1.The System.Collections.Generic.ICollection`1 is read-only.

Clear

Removes all items from the System.Collections.Generic.ICollection`1.The System.Collections.Generic.ICollection`1 is read-only.


Contains(TItem)

Determines whether the System.Collections.Generic.ICollection`1 contains a specific value.

Parameter Type Info
item TItem The object to locate in the System.Collections.Generic.ICollection`1.

Returns: System.Boolean
=> true if item is found in the System.Collections.Generic.ICollection`1; otherwise, false.


CopyTo(TItem[], System.Int32)

Copies the elements of the System.Collections.Generic.ICollection`1 to an System.Array, starting at a particular System.Array index.array is null.arrayIndex is less than 0.The number of elements in the source System.Collections.Generic.ICollection`1 is greater than the available space from arrayIndex to the end of the destination array.

Parameter Type Info
array TItem[] The one-dimensional System.Array that is the destination of the elements copied from System.Collections.Generic.ICollection`1. The System.Array must have zero-based indexing.array is null.arrayIndex is less than 0.The number of elements in the source System.Collections.Generic.ICollection`1 is greater than the available space from arrayIndex to the end of the destination array.
arrayIndex System.Int32 The zero-based index in array at which copying begins.array is null.arrayIndex is less than 0.The number of elements in the source System.Collections.Generic.ICollection`1 is greater than the available space from arrayIndex to the end of the destination array.

GetEnumerator

Returns an enumerator that iterates through the collection.1

Returns: System.Collections.Generic.IEnumerator<TItem>
=> An enumerator that can be used to iterate through the collection.1


Remove(TItem)

Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection`1.The System.Collections.Generic.ICollection`1 is read-only.

Parameter Type Info
item TItem The object to remove from the System.Collections.Generic.ICollection`1.The System.Collections.Generic.ICollection`1 is read-only.

Returns: System.Boolean
=> true if item was successfully removed from the System.Collections.Generic.ICollection`1; otherwise, false. This method also returns false if item is not found in the original System.Collections.Generic.ICollection`1.The System.Collections.Generic.ICollection`1 is read-only.


Resolve

This method will order all the items in such a way as that you can process them linearlly.

Returns: TItem[]
=> the resolved ordered dependenties

Inherited Methods

  • ToString

  • Equals(System.Object)

  • Equals(System.Object, System.Object)

  • ReferenceEquals(System.Object, System.Object)

  • GetHashCode

  • GetType