Class SessionSummary
Represents a summary of the sessions available within SQL Race.
Inheritance
Implements
Namespace: MESL.SqlRace.Domain
Assembly: MESL.SqlRace.Domain.dll
Syntax
public class SessionSummary : Object, ISessionSummary
Constructors
SessionSummary(SessionKey)
Create a session summary, made public so that api implementors can construct and test using this object
Declaration
public SessionSummary(SessionKey sessionKey)
Parameters
Type | Name | Description |
---|---|---|
SessionKey | sessionKey |
Properties
Associates
Gets the collection of associates
Declaration
public IAssociateCollection Associates { get; }
Property Value
Type | Description |
---|---|
IAssociateCollection |
Constants
Gets the collection of session constants for a session.
Declaration
public ReadOnlyCollection<Constant> Constants { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<Constant> |
EndTime
Gets the end time of the session.
Declaration
public long EndTime { get; protected set; }
Property Value
Type | Description |
---|---|
System.Int64 |
ExtendedAssociates
Extended Associates.
Declaration
public IExtendedAssociateCollection ExtendedAssociates { get; }
Property Value
Type | Description |
---|---|
IExtendedAssociateCollection |
FastestLapTime
Get the lap time in nanoseconds of the fastest lap in this session or long.MaxValue if there are no eligible laps
Declaration
public long FastestLapTime { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
FileSessionPath
Gets a file-based session path.
Declaration
public string FileSessionPath { get; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
This will only be set if the Session underlyingly get's it's data from an implemented Session loading assembly.
Id
Gets the Session Id.
Declaration
public int Id { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
This is the Id from the database that uniquely identifies a session.
Identifier
Gets the description.
Declaration
public string Identifier { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
Items
Gets the session details for a session.
Declaration
public IPersistableCollection<SessionDataItem> Items { get; }
Property Value
Type | Description |
---|---|
IPersistableCollection<SessionDataItem> |
Key
Gets the Session Key.
Declaration
public SessionKey Key { get; protected set; }
Property Value
Type | Description |
---|---|
SessionKey |
Laps
Gets the collection of laps for a session.
Declaration
public ReadOnlyCollection<Lap> Laps { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<Lap> |
LocalTimeOfRecording
Gets the local time of recording.
Declaration
public DateTime LocalTimeOfRecording { get; }
Property Value
Type | Description |
---|---|
System.DateTime | The local time of recording. |
MinimumVersionToRead
Gets the Minimum version of the API that is needed to read the session.
Declaration
public string MinimumVersionToRead { get; }
Property Value
Type | Description |
---|---|
System.String |
SessionType
Gets the type of the session.
Declaration
public string SessionType { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
StartTime
Gets the start time of the session.
Declaration
public long StartTime { get; protected set; }
Property Value
Type | Description |
---|---|
System.Int64 |
State
Gets the session state.
Declaration
public SessionState State { get; }
Property Value
Type | Description |
---|---|
SessionState | The session status. |
Remarks
When a session is currently being recorded to, the SessionState will be set to Live. If the session has been loaded from the database, the SessionState will be set to Historical.
TimeOfRecording
Gets the date and time that the session was recorded.
Declaration
public DateTime TimeOfRecording { get; protected set; }
Property Value
Type | Description |
---|---|
System.DateTime |
TimeZone
Gets the time zone.
Declaration
public string TimeZone { get; }
Property Value
Type | Description |
---|---|
System.String | The time zone. |
VersionCompatible
Validates that the SQLRace Version in use is compatible with the DB Version of the required SQLRace Session.
Declaration
public bool VersionCompatible { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True if the installed version of SQL Race is compatible with database version |
VersionUsedToRecord
Gets the version number of the API that was used to record the session.
Declaration
public string VersionUsedToRecord { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
AddOrUpdateSessionDataItem(SessionDataItem)
Overwrite a session detail if it exists or create it otherwise.
Declaration
public virtual void AddOrUpdateSessionDataItem(SessionDataItem item)
Parameters
Type | Name | Description |
---|---|---|
SessionDataItem | item |
FetchSessionDataItems()
Fetch the session data items from the database
Declaration
public IList<SessionDataItem> FetchSessionDataItems()
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<SessionDataItem> | The list of Session Data Items for this session |
GetConnectionString()
Returns the connection string to the session.
Declaration
public string GetConnectionString()
Returns
Type | Description |
---|---|
System.String | Either the database connection string or remote connection string |
Remarks
This will return either the database connection or remote connection is the session is on a SQL Race server instance
GetRemoteConnectionString()
Returns the remote connection string to the session if applicable.
Declaration
public string GetRemoteConnectionString()
Returns
Type | Description |
---|---|
System.String |
ToString()
Returns a System.String that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents this instance. |