Class Lap
Domain entity representing a Lap.
Namespace: MESL.SqlRace.Domain
Assembly: MESL.SqlRace.Domain.dll
Syntax
public class Lap : EntityBase, ILap, IEntityWithSessionKey
Remarks
Laps can have arbitrary data associated with them using the LapDataItem collection
Constructors
Lap(ILap)
Initialises a new instance of the Lap class.
Declaration
public Lap(ILap lap)
Parameters
Type | Name | Description |
---|---|---|
ILap | lap | The lap to create. |
Lap(Int64, Int16, Byte, String, Boolean)
Initialises a new instance of the Lap class.
Declaration
public Lap(long startTime, short number, byte triggerSource, string name, bool countForFastestLap)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | startTime | The start time. |
System.Int16 | number | The number. |
System.Byte | triggerSource | The trigger source. |
System.String | name | The name of the lap. |
System.Boolean | countForFastestLap | If set to true the lap will be used when determining fastest lap |
Properties
CountForFastestLap
Gets a value indicating whether the lap should count towards the fastest lap determination for the session.
Declaration
public bool CountForFastestLap { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
EndTime
Gets or sets the end time of the lap in nanoseconds. If the end time is not specified the implementation will attempt to determine the end time from the session end time. EndTimeUnbounded
Declaration
public Nullable<long> EndTime { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
EndTimeUnbounded
Unbounded end time.
Declaration
public Nullable<long> EndTimeUnbounded { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
LapId
Gets the lap identifier.
Declaration
public int LapId { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The lap identifier. |
LapTime
Gets the lap time in nanoseconds.
Declaration
public Nullable<long> LapTime { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
Name
Gets or sets the lap name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | value |
System.ArgumentException | Lap Name exceeds maximum allowed lap name length of 150 characters. |
Number
Gets or sets the lap number.
Declaration
public short Number { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 | The number. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Negative lap number is not allowed. |
SessionKey
Gets or sets the session key.
Declaration
public SessionKey SessionKey { get; set; }
Property Value
Type | Description |
---|---|
SessionKey | The session key. |
StartTime
Gets or sets the start time of the lap in nanoseconds.
Declaration
public long StartTime { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
TimeRange
Gets the time range for the lap.
Declaration
public Nullable<TimeRange> TimeRange { get; }
Property Value
Type | Description |
---|---|
System.Nullable<TimeRange> |
TriggerSource
Gets the trigger source for a lap.
Declaration
public byte TriggerSource { get; set; }
Property Value
Type | Description |
---|---|
System.Byte |
Remarks
Trigger sources are user defined and can be values such as:
- On Circuit
- Pit Lane
- Out Lap
- In Lap
- etc.
Methods
ToString()
Returns a System.String that represents the current System.Object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents the current System.Object. |