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
TBaseBase type of encapsulated model collections.
TPrimaryPrimary collection element type.
TSecondarySecondary collection element type.
- Inheritance
-
ObjectCombinedModelCollectionView<TBase, TPrimary, TSecondary>
- Implements
-
IList<TBase>ICollection<TBase>IEnumerable<TBase>IListICollectionIEnumerable
- 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
primaryModelCollection<TPrimary>Primary collection.
secondaryModelCollection<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
keyStringThe key of the element to get.
Property Value
- TBase
The element with the specified key.
Methods
Add(TBase)
public void Add(TBase item)
Parameters
itemTBase
Add(Object)
public int Add(object value)
Parameters
valueObject
Returns
- Int32
Clear()
public void Clear()
Contains(TBase)
public bool Contains(TBase item)
Parameters
itemTBase
Returns
- Boolean
Contains(String)
Determines whether the primary or secondary ModelCollection<T> contain a specific value.
public bool Contains(string item)
Parameters
itemStringThe 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
arrayTBase[]arrayIndexInt32
CopyTo(Array, Int32)
public void CopyTo(Array array, int index)
Parameters
arrayArrayindexInt32
GetEnumerator()
public IEnumerator<TBase> GetEnumerator()
Returns
- IEnumerator<TBase>
IndexOf(TBase)
public int IndexOf(TBase item)
Parameters
itemTBase
Returns
- Int32
IndexOf(Object)
public int IndexOf(object value)
Parameters
valueObject
Returns
- Int32
Insert(Int32, TBase)
public void Insert(int index, TBase item)
Parameters
indexInt32itemTBase
Insert(Int32, Object)
public void Insert(int index, object value)
Parameters
indexInt32valueObject
Remove(TBase)
public bool Remove(TBase item)
Parameters
itemTBase
Returns
- Boolean
Remove(Object)
public void Remove(object value)
Parameters
valueObject
RemoveAt(Int32)
public void RemoveAt(int index)
Parameters
indexInt32
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
keyStringThe key whose value to get.
valueTBaseWhen 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
indexInt32
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
indexInt32The 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
indexInt32valueTBase
ICollection.SyncRoot
object ICollection.SyncRoot { get; }
Returns
- Object
IEnumerable.GetEnumerator()
IEnumerator IEnumerable.GetEnumerator()
Returns
- IEnumerator
IList.Contains(Object)
bool IList.Contains(object value)
Parameters
valueObject
Returns
- Boolean
IList.get_Item(Int32)
object IList.get_Item(int index)
Parameters
indexInt32
Returns
- Object
IList.Item[Int32]
Gets or sets the element at the specified index (CURRENTLY NOT IMPLEMENTED!)
object IList.this[] { get; set; }
Parameters
indexInt32The 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
indexInt32valueObject