Click or drag to resize

DHI.Mike1D.Generic.Collections Namespace

Various collection classes used by MIKE 1D.
Classes
  ClassDescription
Public classEnumerableBaseWrapperT, TBase
Public classEnumerableKeyWrapperT, TKey
Public classEnumerableWrapperT1, T2
Wrap an enumerable of type T1 to one of type T2.
Public classEnumeratorBaseWrapperT, TBase
Public classEnumeratorKeyWrapperT, TKey
Public classEnumeratorWrapperT1, T2
Wrap an enumerator of type T2 to one of type T1.
Public classFifoQueueT
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 classFifoQueueTEnumerator
Enumerates the elements of a FiroQueue{T}.
Public classCode exampleListBaseWrapperT, 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 classListWrapperT

Wrapping of an IListT 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 classListWrapperT1, 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 classSingleEnumerableT
Light weight class for enumerating over a single object.
Public classSingleEnumeratorT
Light weight class for enumerating over a single object.
Public classValueIdList
Structures