DHI.Mike1D.Generic.Collections Namespace

Various collection classes used by MIKE 1D.

Classes

EnumerableBaseWrapperT, TBase

Wrapping of an IEnumerableT of T to an IEnumerableT of TBase, under the assumption that T extends TBase.

This will make the enumerable available as having base class elements, without copying the content of the enumerable.

EnumerableKeyWrapperT, TKey

Wrapping of an IEnumerableT of T to an IEnumerableT of TKey, where the provided key selector can extract from T a key of type TKey.

This will make the enumerable available as having key class elements, without copying the content of the enumerable.

EnumerableWrapperT1, T2 Wrap an enumerable of type T1 to one of type T2.
EnumeratorBaseWrapperT, TBase

Wrapping of an IEnumeratorT of T to an IEnumeratorT of TBase, under the assumption that T extends TBase.

This will make the enumerator available as having base class elements, without copying the content of the enumerator.

EnumeratorKeyWrapperT, TKey

Wrapping of an IEnumeratorT of T to an IEnumeratorT of TKey, where the provided key selector can extract from T a key of type TKey.

This will make the enumerator available as having key class elements, without copying the content of the enumerator.

EnumeratorWrapperT1, T2 Wrap an enumerator of type T2 to one of type T1.
FifoQueueT Represents a first-in, first-out collection of objects.

Compared to the standard generic Queue, this queue allows access to queue elements through 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.

FifoQueueTEnumerator Enumerates the elements of a FiroQueue{T}.
ListBaseWrapperT, 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.

ListWrapperT

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.

ListWrapperT1, T2 List class that is wrapping an IList{T1} as in IList{T2}, where T2 is evaluated from T1 through a delegate.

T2 can be is a property of T1, i.e. if having a list of complex objects like MyClass below, to expose the string id's as an IList{string}: Class MyClass { public string Id { get; set;} ... } List<MyClass> list = new List<MyClass>(); IList<string> listStrings = new ListWrapper<MyClass, string>(list, (mc) => mc.Id);

NetworkValueIdList Class containing ValueIdLists for different network locations.
SingleEnumerableT Light weight class for enumerating over a single object.
SingleEnumeratorT Light weight class for enumerating over a single object.
TimeValueBuffer A buffer of values, storing a buffer of values together with their time, and interpolate values based on a datetime within the buffer time span
ValueIdList Class for assigning double values to string Ids

Structures

ValueIdListItem Helper struct returning value for a given index of ValueIdList.

Enumerations

TimeValueBufferExtrapolationFlags Flag value indicating how Extrapolation should happen