Class LapCollection
The lap collection is responsible for managing the collection of laps for a session i.e. modifying end times for laps as they are added, and for ensuring that changes get persisted.
Implements
Inherited Members
Namespace: MESL.SqlRace.Domain.Collections
Assembly: MESL.SqlRace.Domain.dll
Syntax
public class LapCollection : PersistableCollection<Lap>, IList, ICollection, ILapCollection, ILapCollectionInternal, IPersistableCollectionInternal<Lap>, IPersistableCollection<Lap>, IList<Lap>, ICollection<Lap>, IEnumerable<Lap>, IEnumerable
Properties
Constants
Gets the collection lap constants. Items containing binary data will not contain their data, however the data can be retrieved by calling GetBinaryData.
Declaration
public SessionDataItemsCollection<LapConstant> Constants { get; }
Property Value
Type | Description |
---|---|
SessionDataItemsCollection<LapConstant> | The lap items. |
DebouncePeriod
Gets or sets the de-bounce period for a lap.
Declaration
public long DebouncePeriod { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 | The de-bounce period. |
FastestLap
Gets the fastest lap in the collection. This is the lap with the shortest lap time where CountForFastestLap is true.
Declaration
public Lap FastestLap { get; }
Property Value
Type | Description |
---|---|
Lap | The fastest lap, or null if there is no suitable match. |
LapItems
Gets the collection lap data items. Items containing binary data will not contain their data, however the data can be retrieved by calling GetBinaryData.
Declaration
public SessionDataItemsCollection<LapDataItem> LapItems { get; }
Property Value
Type | Description |
---|---|
SessionDataItemsCollection<LapDataItem> | The lap items. |
Maps
Gets the collection lap maps. Items containing binary data will not contain their data, however the data can be retrieved by calling PopulateDataPoints.
Declaration
public MapCollection<LapMapBase> Maps { get; }
Property Value
Type | Description |
---|---|
MapCollection<LapMapBase> |
Methods
Add(IEnumerable<Lap>)
Adds multiple laps
Declaration
public override void Add(IEnumerable<Lap> laps)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<Lap> | laps | The new laps to add |
Overrides
AddNoRepository(Lap)
Adds the item without modifying the repository.
Declaration
protected override void AddNoRepository(Lap item)
Parameters
Type | Name | Description |
---|---|---|
Lap | item |
Overrides
InsertItem(Int32, Lap)
Inserts the item and if necessary adjusts the end time for the previous lap.
Declaration
protected override void InsertItem(int index, Lap newLap)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
Lap | newLap | The new lap. |
Overrides
RemoveItem(Int32)
Removes the item from the collection, and if necessary adjusts the end time for previous lap.
Declaration
protected override void RemoveItem(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
Overrides
RemoveNoRepository(Lap)
Removes the item without modifying the repository.
Declaration
protected override void RemoveNoRepository(Lap item)
Parameters
Type | Name | Description |
---|---|---|
Lap | item |
Overrides
Update(Lap)
Updates the specified lap, overwriting it's data with that in the passed lap instance. The lap instance passed must have been previously persisted to the session.
Declaration
public void Update(Lap lap)
Parameters
Type | Name | Description |
---|---|---|
Lap | lap | The lap to update. |