Show / Hide Table of Contents

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.

Inheritance
System.Object
SynchronizedList<Lap>
PersistableCollection<Lap>
LapCollection
Implements
System.Collections.IList
System.Collections.ICollection
ILapCollection
IPersistableCollection<Lap>
System.Collections.Generic.IList<Lap>
System.Collections.Generic.ICollection<Lap>
System.Collections.Generic.IEnumerable<Lap>
System.Collections.IEnumerable
Inherited Members
PersistableCollection<Lap>.Clear()
PersistableCollection<Lap>.Overwrite(Lap, Predicate<Lap>)
PersistableCollection<Lap>.RemoveAll(Predicate<Lap>)
PersistableCollection<Lap>.ClearItems()
PersistableCollection<Lap>.InitialAddItems(IEnumerable<Lap>)
PersistableCollection<Lap>.PublishAddedEvent(Lap)
PersistableCollection<Lap>.PublishRemovedEvent(Lap)
PersistableCollection<Lap>.SetItem(Int32, Lap)
PersistableCollection<Lap>.ItemAdded
PersistableCollection<Lap>.ItemRemoved
SynchronizedList<Lap>.Add(Lap)
SynchronizedList<Lap>.CopyTo(Lap[], Int32)
SynchronizedList<Lap>.IndexOf(Lap)
SynchronizedList<Lap>.Contains(Lap)
SynchronizedList<Lap>.GetEnumerator()
SynchronizedList<Lap>.Clone()
SynchronizedList<Lap>.Remove(Lap)
SynchronizedList<Lap>.Insert(Int32, Lap)
SynchronizedList<Lap>.Add(Object)
SynchronizedList<Lap>.Contains(Object)
SynchronizedList<Lap>.IndexOf(Object)
SynchronizedList<Lap>.Insert(Int32, Object)
SynchronizedList<Lap>.Remove(Object)
SynchronizedList<Lap>.AddBase(Object)
SynchronizedList<Lap>.CopyTo(Array, Int32)
SynchronizedList<Lap>.CopyToBase(Array, Int32)
SynchronizedList<Lap>.Items
SynchronizedList<Lap>.Item[Int32]
SynchronizedList<Lap>.Count
SynchronizedList<Lap>.IsSynchronized
SynchronizedList<Lap>.IsFixedSize
SynchronizedList<Lap>.SyncRoot
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
MESL.SqlRace.Domain.Collections.PersistableCollection<MESL.SqlRace.Domain.Lap>.Add(System.Collections.Generic.IEnumerable<MESL.SqlRace.Domain.Lap>)

AddNoRepository(Lap)

Adds the item without modifying the repository.

Declaration
protected override void AddNoRepository(Lap item)
Parameters
Type Name Description
Lap item
Overrides
MESL.SqlRace.Domain.Collections.PersistableCollection<MESL.SqlRace.Domain.Lap>.AddNoRepository(MESL.SqlRace.Domain.Lap)

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
MESL.SqlRace.Domain.Collections.PersistableCollection<MESL.SqlRace.Domain.Lap>.InsertItem(System.Int32, MESL.SqlRace.Domain.Lap)

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
MESL.SqlRace.Domain.Collections.PersistableCollection<MESL.SqlRace.Domain.Lap>.RemoveItem(System.Int32)

RemoveNoRepository(Lap)

Removes the item without modifying the repository.

Declaration
protected override void RemoveNoRepository(Lap item)
Parameters
Type Name Description
Lap item
Overrides
MESL.SqlRace.Domain.Collections.PersistableCollection<MESL.SqlRace.Domain.Lap>.RemoveNoRepository(MESL.SqlRace.Domain.Lap)

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.

Implements

System.Collections.IList
System.Collections.ICollection
ILapCollection
IPersistableCollection<T>
System.Collections.Generic.IList<>
System.Collections.Generic.ICollection<>
System.Collections.Generic.IEnumerable<>
System.Collections.IEnumerable
Back to top Generated by DocFX