/// <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);
        }
예제 #2
0
        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);
        }
예제 #5
0
        /// <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.");
        }
예제 #6
0
        private void SessionLowOnOddsChange(object sender, OddsChangeEventArgs <ISportEvent> oddsChangeEventArgs)
        {
            var baseEntity = oddsChangeEventArgs.GetOddsChange();

            WriteLowSportEntity(baseEntity.GetType().Name, baseEntity.Event);
        }
예제 #7
0
        private void SessionOnOddsChange(object sender, OddsChangeEventArgs <ISportEvent> oddsChangeEventArgs)
        {
            var baseEntity = oddsChangeEventArgs.GetOddsChange();

            WriteSportEntity(baseEntity.GetType().Name, baseEntity.Event, baseEntity.Timestamps.Created);
        }