C# Class TrainNotifier.Service.LiveTrainRepository

Inheritance: DbRepository, IDisposable
Afficher le fichier Open project: blueghostuk/trainnotifier-server

Méthodes publiques

Méthode Description
AddActivation ( TrainActivation activation ) : void
AddCancellation ( CancelledTrainMovementStep cm ) : bool
AddMovement ( TrainMovementStep tms ) : bool
BatchInsertTrainData ( IEnumerable trainData, bool onFailAddToQueue = true ) : void
Dispose ( ) : void
GetMatchingSchedule ( TrainActivation activation ) : MatchSchedule
PreLoadActivations ( ) : void

Pre-loads trains activated or in progress set to depart from 12 hours ago into the future

StartTimer ( ) : void
UpdateMovement ( System.Guid trainId, TDElement td, IEnumerable tiplocIds, TrainMovementEventType eventType, System.DateTime actualTime, LiveTrainStopSource source = LiveTrainStopSource.TD ) : bool

Update a train movement

UpdateTrainState ( System.Guid trainId, TrainState state ) : void

Private Methods

Méthode Description
AddChangeOfOrigin ( TrainChangeOfOrigin tOrigin ) : bool
AddFirstArrivalMovement ( System.Guid trainId, System.DateTime departureTime, ScheduleStop scheduleStop ) : void
AddReinstatement ( TrainReinstatement tr ) : bool
GetDatePartSql ( System.DateTime date ) : string
GetNextStop ( string trainId, TrainMovementEventType eventType, string stanox, byte latestStopNumber ) : ScheduleStop
ProcessQueue ( object ignored ) : void
SetLiveTrainSchedule ( TrainActivation activation, IEnumerable tiplocs ) : void
TrainExists ( string trainId, Activation &tm ) : bool
UpdateLiveTrainOrigin ( System.Guid trainId, short tiplocId ) : void

Method Details

AddActivation() public méthode

public AddActivation ( TrainActivation activation ) : void
activation TrainNotifier.Common.Model.TrainActivation
Résultat void

AddCancellation() public méthode

public AddCancellation ( CancelledTrainMovementStep cm ) : bool
cm TrainNotifier.Common.Model.CancelledTrainMovementStep
Résultat bool

AddMovement() public méthode

public AddMovement ( TrainMovementStep tms ) : bool
tms TrainNotifier.Common.Model.TrainMovementStep
Résultat bool

BatchInsertTrainData() public méthode

public BatchInsertTrainData ( IEnumerable trainData, bool onFailAddToQueue = true ) : void
trainData IEnumerable
onFailAddToQueue bool
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

GetMatchingSchedule() public méthode

public GetMatchingSchedule ( TrainActivation activation ) : MatchSchedule
activation TrainNotifier.Common.Model.TrainActivation
Résultat MatchSchedule

PreLoadActivations() public méthode

Pre-loads trains activated or in progress set to depart from 12 hours ago into the future
public PreLoadActivations ( ) : void
Résultat void

StartTimer() public méthode

public StartTimer ( ) : void
Résultat void

UpdateMovement() public méthode

Update a train movement
public UpdateMovement ( System.Guid trainId, TDElement td, IEnumerable tiplocIds, TrainMovementEventType eventType, System.DateTime actualTime, LiveTrainStopSource source = LiveTrainStopSource.TD ) : bool
trainId System.Guid id of live train
td TDElement
tiplocIds IEnumerable reporting tiploc(s)
eventType TrainMovementEventType arrival or departure to update
actualTime System.DateTime actual time to set
source LiveTrainStopSource source of data
Résultat bool

UpdateTrainState() public méthode

public UpdateTrainState ( System.Guid trainId, TrainState state ) : void
trainId System.Guid
state TrainState
Résultat void