/// <summary>
        /// Invoked when bet settlement message is received
        /// </summary>
        /// <param name="sender">The instance raising the event</param>
        /// <param name="e">The event arguments</param>
        protected virtual void OnBetSettlementReceived(object sender, BetSettlementEventArgs <ISportEvent> e)
        {
            var betSettlement = e.GetBetSettlement();

            FeedMessages.Add(new FMessage(betSettlement.Timestamps.Created, betSettlement.Event, "BetSettlement"));
            WriteMessageData((IOddsFeedSession)sender, e.GetBetSettlement(), DateTime.Now);
        }
Ejemplo n.º 2
0
        private void SessionOnBetSettlement(object sender, BetSettlementEventArgs <ISportEvent> betSettlementEventArgs)
        {
            var baseEntity = betSettlementEventArgs.GetBetSettlement();

            WriteSportEntity(baseEntity.GetType().Name, baseEntity.Event);
            _marketWriter.WriteMarketNamesForEvent(baseEntity.Markets);
        }
        /// <summary>
        /// Invoked when bet settlement message is received
        /// </summary>
        /// <param name="sender">The instance raising the event</param>
        /// <param name="e">The event arguments</param>
        private void OnBetSettlementReceived(object sender, BetSettlementEventArgs <T> e)
        {
            var betSettlement = e.GetBetSettlement();

            _log.LogInformation($"BetSettlement received. EventId:{betSettlement.Event.Id} Producer:{betSettlement.Producer}, RequestId:{betSettlement.RequestId}, Market count:{betSettlement.Markets.Count()}");
            _sportEntityWriter?.WriteData(betSettlement.Event);
            _marketWriter?.WriteMarketNamesForEvent(betSettlement.Markets);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Invoked when bet settlement message is received
        /// </summary>
        /// <param name="sender">The instance raising the event</param>
        /// <param name="e">The event arguments</param>
        private void OnBetSettlementReceived(object sender, BetSettlementEventArgs <T> e)
        {
            Guard.Argument(e, nameof(e)).NotNull();

            using var t = SdkMetricsFactory.MetricsRoot.Measure.Timer.Time(_timerOnBetSettlementReceived, $"{e.GetBetSettlement().Event.Id}");
            var betSettlement = e.GetBetSettlement();

            _log.LogInformation($"BetSettlement received. EventId:{betSettlement.Event.Id} Producer:{betSettlement.Producer.Name}, RequestId:{betSettlement.RequestId}, Market count:{betSettlement.Markets.Count()}");
            _sportEntityWriter?.WriteData(betSettlement.Event);
            _marketWriter?.WriteMarketNamesForEvent(betSettlement.Markets);
            _log.LogInformation($"BetSettlement received. EventId:{betSettlement.Event.Id}. Processing took {t.Elapsed.TotalMilliseconds}ms.");
        }
Ejemplo n.º 5
0
        private void SessionLowOnBetSettlement(object sender, BetSettlementEventArgs <ISportEvent> betSettlementEventArgs)
        {
            var baseEntity = betSettlementEventArgs.GetBetSettlement();

            WriteLowSportEntity(baseEntity.GetType().Name, baseEntity.Event);
        }
Ejemplo n.º 6
0
        private void SessionOnBetSettlement(object sender, BetSettlementEventArgs <ISportEvent> betSettlementEventArgs)
        {
            var baseEntity = betSettlementEventArgs.GetBetSettlement();

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