Class SessionDataItemsCollection<T>
This collection class supports persistence of data items associated with a session (i.e. session items and lap items). Includes separate api for loading of binary data associated with a data item (explicit call is required for binary data)
Inheritance
Implements
Inherited Members
Namespace: MESL.SqlRace.Domain.Collections
Assembly: MESL.SqlRace.Domain.dll
Syntax
public class SessionDataItemsCollection<T> : PersistableCollection<T>, IList, ICollection, IPersistableCollectionInternal<T>, IPersistableCollection<T>, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable where T : SessionDataItem
Type Parameters
Name | Description |
---|---|
T | Type of session data item in collection |
Methods
AddNoRepository(T)
Adds the item without modifying the repository.
Declaration
protected override void AddNoRepository(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item. |
Overrides
GetBinaryData(T)
Gets the binary data for the passed item.
Declaration
public byte[] GetBinaryData(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item object. |
Returns
Type | Description |
---|---|
System.Byte[] | Byte array representing the item |
GetPersistableGuid()
Generates a persistable GUID used to uniquely identify the session details
Declaration
public Guid GetPersistableGuid()
Returns
Type | Description |
---|---|
System.Guid | A unique Guid |
InsertItem(Int32, T)
Inserts the item.
Declaration
protected override void InsertItem(int index, T newItem)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
T | newItem | The new item. |
Overrides
RemoveItem(Int32)
Removes the object at the index from the System.Collections.ObjectModel.Collection`1. If the item is associated with binary data then the underlying binary data is deleted from the database.
Declaration
protected override void RemoveItem(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
Overrides
Replace(List<T>)
Replaces the session data items with new ones
Declaration
public void Replace(List<T> newItems)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T> | newItems |