/// <summary> /// Invoked when odds change message is received /// </summary> /// <param name="sender">The instance raising the event</param> /// <param name="e">The event arguments</param> protected virtual void OnOddsChangeReceived(object sender, OddsChangeEventArgs <ISportEvent> e) { var oddsChange = e.GetOddsChange(); FeedMessages.Add(new FMessage(oddsChange.Timestamps.Created, oddsChange.Event, "OddsChange")); WriteMessageData((IOddsFeedSession)sender, e.GetOddsChange(), DateTime.Now); }
private void SessionOnOddsChange(object sender, OddsChangeEventArgs <ISportEvent> oddsChangeEventArgs) { var baseEntity = oddsChangeEventArgs.GetOddsChange(); WriteSportEntity(baseEntity.GetType().Name, baseEntity.Event); _marketWriter.WriteMarketNamesForEvent(baseEntity.Markets); }
/// <summary> /// Invoked when odds change message is received /// </summary> /// <param name="sender">The instance raising the event</param> /// <param name="e">The event arguments</param> protected virtual void OnOddsChangeReceived(object sender, OddsChangeEventArgs <T> e) { Guard.Argument(e, nameof(e)).NotNull(); var oddsChange = e.GetOddsChange(); _log.LogInformation($"OddsChange received. EventId:{oddsChange.Event.Id} Producer:{oddsChange.Producer} RequestId:{oddsChange.RequestId}"); _sportEntityWriter?.WriteData(oddsChange.Event); _marketWriter?.WriteMarketNamesForEvent(oddsChange.Markets); }
/// <summary> /// Invoked when odds change message is received /// </summary> /// <param name="sender">The instance raising the event</param> /// <param name="e">The event arguments</param> protected virtual void OnOddsChangeReceived(object sender, OddsChangeEventArgs <T> e) { Contract.Requires(e != null); var oddsChange = e.GetOddsChange(); _log.Info($"OddsChange received. EventId:{oddsChange.Event.Id} Producer:{oddsChange.Producer} RequestId:{oddsChange.RequestId}"); _sportEntityWriter?.WriteData(oddsChange.Event); _marketWriter?.WriteMarketNamesForEvent(oddsChange.Markets); }
/// <summary> /// Invoked when odds change message is received /// </summary> /// <param name="sender">The instance raising the event</param> /// <param name="e">The event arguments</param> protected virtual void OnOddsChangeReceived(object sender, OddsChangeEventArgs <T> e) { Guard.Argument(e, nameof(e)).NotNull(); using var t = SdkMetricsFactory.MetricsRoot.Measure.Timer.Time(_timerOnOddsChangeReceived, $"{e.GetOddsChange().Event.Id}"); var oddsChange = e.GetOddsChange(); _log.LogInformation($"OddsChange received. EventId:{oddsChange.Event.Id} Producer:{oddsChange.Producer.Name} RequestId:{oddsChange.RequestId}"); _sportEntityWriter?.WriteData(oddsChange.Event); _marketWriter?.WriteMarketNamesForEvent(oddsChange.Markets); _log.LogInformation($"OddsChange received. EventId:{oddsChange.Event.Id}. Processing took {t.Elapsed.TotalMilliseconds}ms."); }
private void SessionLowOnOddsChange(object sender, OddsChangeEventArgs <ISportEvent> oddsChangeEventArgs) { var baseEntity = oddsChangeEventArgs.GetOddsChange(); WriteLowSportEntity(baseEntity.GetType().Name, baseEntity.Event); }
private void SessionOnOddsChange(object sender, OddsChangeEventArgs <ISportEvent> oddsChangeEventArgs) { var baseEntity = oddsChangeEventArgs.GetOddsChange(); WriteSportEntity(baseEntity.GetType().Name, baseEntity.Event, baseEntity.Timestamps.Created); }