public void ProcessPrchMessage(PrchMessage prchMessage) { PrchEventArgs e = new PrchEventArgs { LaneNumber = prchMessage.LaneNumber, ShooterNumber = prchMessage.ShooterNumber, }; OnPrch(e); }
private void ShootingRangeOnPrch(object sender, PrchEventArgs e) { Shooter shooter = _shooterDataStore.FindByShooterNumber(e.ShooterNumber); if (shooter == null) { LogMessage(string.Format("ShooterNumber {0} not available. Creating shooter...", e.ShooterNumber)); shooter = CreateUnknownShooter(e.ShooterNumber); } if (_sessionsOngoing.ContainsKey(e.LaneNumber)) { _sessionsOngoing.Remove(e.LaneNumber); } _sessionsAwaitingProgramNumber.Add(e.LaneNumber, new Session { LaneNumber = e.LaneNumber, ShooterId = shooter.ShooterId, }); }
protected virtual void OnPrch(PrchEventArgs e) { EventHandler<PrchEventArgs> handler = Prch; if (handler != null) handler(this, e); }