Table of Contents

Class CombinedModelCollectionView<TBase, TPrimary, TSecondary>

Namespace
TimeCockpit.Data.DataModel
Assembly
TimeCockpit.Data.dll

Combined view on a set of model collections.

public class CombinedModelCollectionView<TBase, TPrimary, TSecondary> : IList<TBase>, ICollection<TBase>, IEnumerable<TBase>, IList, ICollection, IEnumerable where TBase : NamedDynamicObject where TPrimary : TBase where TSecondary : TBase

Type Parameters

TBase

Base type of encapsulated model collections.

TPrimary

Primary collection element type.

TSecondary

Secondary collection element type.

Inheritance
Object
CombinedModelCollectionView<TBase, TPrimary, TSecondary>
Implements
IList<TBase>
ICollection<TBase>
IEnumerable<TBase>
IList
ICollection
IEnumerable
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()

Constructors

CombinedModelCollectionView(ModelCollection<TPrimary>, ModelCollection<TSecondary>)

Initializes a new instance of the CombinedModelCollectionView class.

public CombinedModelCollectionView(ModelCollection<TPrimary> primary, ModelCollection<TSecondary> secondary)

Parameters

primary ModelCollection<TPrimary>

Primary collection.

secondary ModelCollection<TSecondary>

Secondary collection.

Properties

Count

public int Count { get; }

Property Value

Int32

IsFixedSize

public bool IsFixedSize { get; }

Property Value

Boolean

IsReadOnly

public bool IsReadOnly { get; }

Property Value

Boolean

IsSynchronized

public bool IsSynchronized { get; }

Property Value

Boolean

Item[String]

Gets or sets the element with the specified key via TryGetValue.

public TBase this[string key] { get; }

Parameters

key String

The key of the element to get.

Property Value

TBase

The element with the specified key.

Methods

Add(TBase)

public void Add(TBase item)

Parameters

item TBase

Add(Object)

public int Add(object value)

Parameters

value Object

Returns

Int32

Clear()

public void Clear()

Contains(TBase)

public bool Contains(TBase item)

Parameters

item TBase

Returns

Boolean

Contains(String)

Determines whether the primary or secondary ModelCollection<T> contain a specific value.

public bool Contains(string item)

Parameters

item String

The name of the object to locate in the ModelCollection<T>s.

Returns

Boolean

True if the item is found in the ModelCollection<T>s, otherwise false.

CopyTo(TBase[], Int32)

public void CopyTo(TBase[] array, int arrayIndex)

Parameters

array TBase[]
arrayIndex Int32

CopyTo(Array, Int32)

public void CopyTo(Array array, int index)

Parameters

array Array
index Int32

GetEnumerator()

public IEnumerator<TBase> GetEnumerator()

Returns

IEnumerator<TBase>

IndexOf(TBase)

public int IndexOf(TBase item)

Parameters

item TBase

Returns

Int32

IndexOf(Object)

public int IndexOf(object value)

Parameters

value Object

Returns

Int32

Insert(Int32, TBase)

public void Insert(int index, TBase item)

Parameters

index Int32
item TBase

Insert(Int32, Object)

public void Insert(int index, object value)

Parameters

index Int32
value Object

Remove(TBase)

public bool Remove(TBase item)

Parameters

item TBase

Returns

Boolean

Remove(Object)

public void Remove(object value)

Parameters

value Object

RemoveAt(Int32)

public void RemoveAt(int index)

Parameters

index Int32

TryGetValue(String, out TBase)

Gets the value associated with the specified key. This method performs the lookup in the SYS, APP, USR order. It checks the primary collection first and then the secondary if there was no primary match!

public bool TryGetValue(string key, out TBase value)

Parameters

key String

The key whose value to get.

value TBase

When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Returns

Boolean

true if the object that implements System.Collections.Generic.IDictionary<TKey, TValue> contains an element with the specified key; otherwise, false.

Explicit Interface Implementations

IList<TBase>.get_Item(Int32)

TBase IList<TBase>.get_Item(int index)

Parameters

index Int32

Returns

TBase

IList<TBase>.Item[Int32]

Gets or sets the element at the specified index (CURRENTLY NOT IMPLEMENTED!)

TBase IList<TBase>.this[] { get; set; }

Parameters

index Int32

The zero-based index of the element to get or set (CURRENTLY NOT USED!).

Returns

TBase

The element at the specified index.

Remarks

This method is currently not implemented and therefore it always throws a System.NotImplementedException.

Exceptions

System.NotImplementedException

Always thrown because property is currently not implemented.

IList<TBase>.set_Item(Int32, TBase)

void IList<TBase>.set_Item(int index, TBase value)

Parameters

index Int32
value TBase

ICollection.SyncRoot

object ICollection.SyncRoot { get; }

Returns

Object

IEnumerable.GetEnumerator()

IEnumerator IEnumerable.GetEnumerator()

Returns

IEnumerator

IList.Contains(Object)

bool IList.Contains(object value)

Parameters

value Object

Returns

Boolean

IList.get_Item(Int32)

object IList.get_Item(int index)

Parameters

index Int32

Returns

Object

IList.Item[Int32]

Gets or sets the element at the specified index (CURRENTLY NOT IMPLEMENTED!)

object IList.this[] { get; set; }

Parameters

index Int32

The zero-based index of the element to get or set (CURRENTLY NOT USED!).

Returns

Object

The element at the specified index.

Remarks

This method is currently not implemented and therefore it always throws a System.NotImplementedException.

Exceptions

System.NotImplementedException

Always thrown because property is currently not implemented.

IList.set_Item(Int32, Object)

void IList.set_Item(int index, object value)

Parameters

index Int32
value Object