Click or drag to resize

DHI.Mike1D.Generic.Collections Namespace

Various collection classes used by MIKE 1D.
Classes
  ClassDescription
Public classEnumerableBaseWrapper<T, TBase>
Public classEnumerableKeyWrapper<T, TKey>
Public classEnumerableWrapper<T1, T2>
Wrap an enumerable of type T1 to one of type T2.
Public classEnumeratorBaseWrapper<T, TBase>
Public classEnumeratorKeyWrapper<T, TKey>
Public classEnumeratorWrapper<T1, T2>
Wrap an enumerator of type T2 to one of type T1.
Public classFifoQueue<T>
Represents a first-in, first-out collection of objects.

Compared to the standard generic Queue, this queue allows access to queue elements throught the [P:Item(int)] property of the IList{T} interface. It implements the IList{T} interface, supporting in-queue modifications, i.e. methods like Remove and Insert.

The next element to be dequeued is the first element in the IList{T},

this[0]
. New elements are added in the end of the list.

Public classFifoQueue<T>.Enumerator
Enumerates the elements of a FiroQueue{T}.
Public classCode exampleListBaseWrapper<T, TBase>

Wrapping of an IList{T} to an IList{TBase}, when T extends TBase.

This will make the list available as a list with base class elements, without copying the content of the list.

The wrapper supports all read functionality, while only partly "write" functionality. For example, adding to the list an element which is of type TBase and not of T will throw an exception.

Public classListWrapper<T>

Wrapping of an IList<T> of T to also implement an IList.

This will make the list available as a non-generic list, without copying the content of the list.

The wrapper supports all read functionality, while only partly "write" functionality. For example, adding to the list an element which is not of type T will throw an exception.

Public classListWrapper<T1, T2>
List class that is wrapping an IList{T1} as in IList{T2}, where T2 is evaluated from T1.

Often T2 is a property of T1, i.e. if having a list of complex objects like MyClass below, to expose the string id's a an IList{string}:

Class MyClass 
{
  public string Id { get; set;}
  ...
}

IList{string} listStrings = new ListSelector(IList{MyClass} list, (mc) => mc.Id);

Public classNetworkValueIdList
Public classSingleEnumerable<T>
Light weight class for enumerating over a single object.
Public classSingleEnumerator<T>
Light weight class for enumerating over a single object.
Public classValueIdList
Structures