/// <summary>
        /// Initializes a new instance of the <see cref="EntityProcessor"/> class.
        /// </summary>
        /// <param name="dispatcher">A <see cref="IEntityDispatcher{ISportEvent}" /> whose dispatched entities will be processed by the current instance</param>
        /// <param name="writer">A <see cref="SportEntityWriter" /> used to output / log the dispatched entities</param>
        public EntityProcessor(IEntityDispatcher <ISportEvent> dispatcher, SportEntityWriter writer = null)
        {
            Contract.Requires(dispatcher != null);

            _dispatcher = dispatcher;
            _writer     = writer;
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SimpleMessageProcessor" /> class.
 /// </summary>
 /// <param name="dispatcher">
 /// A <see cref="IEntityDispatcher{ISportEvent}" /> whose dispatched entities will be processed by the current instance.
 /// </param>
 /// <param name="name">The name of the session/processor</param>
 /// <param name="log">A <see cref="ILogger" /> instance used for logging</param>
 public SimpleMessageProcessor(IEntityDispatcher <ISportEvent> dispatcher, string name = null, ILog log = null)
 {
     _dispatcher  = dispatcher;
     _log         = log ?? SdkLoggerFactory.GetLogger(typeof(SimpleMessageProcessor));
     FeedMessages = new ConcurrentBag <FMessage>();
     Name         = name ?? ((IOddsFeedSession)dispatcher).Name;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="EntityProcessor{T}"/> class
        /// </summary>
        /// <param name="dispatcher">A <see cref="IEntityDispatcher{ISportEvent}" /> whose dispatched entities will be processed by the current instance</param>
        /// <param name="writer">A <see cref="SportEntityWriter" /> used to output / log the dispatched entities</param>
        /// <param name="marketWriter">A <see cref="MarketWriter"/> used to write market and outcome data</param>
        public EntityProcessor(IEntityDispatcher <T> dispatcher, SportEntityWriter writer = null, MarketWriter marketWriter = null)
        {
            Guard.Argument(dispatcher, nameof(dispatcher)).NotNull();

            _dispatcher        = dispatcher;
            _sportEntityWriter = writer;
            _marketWriter      = marketWriter;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="IEntityDispatcher{ISportEvent}"/> class
        /// </summary>
        /// <param name="dispatcher">A <see cref="IEntityDispatcher{ISportEvent}" /> whose dispatched entities will be processed by the current instance</param>
        /// <param name="writer">A <see cref="SportEntityWriter" /> used to output / log the dispatched entities</param>
        /// <param name="marketWriter">A <see cref="MarketWriter"/> used to write market and outcome data</param>
        /// <param name="log">A <see cref="ILogger" /> instance used for logging</param>
        public EntityProcessor(IEntityDispatcher <T> dispatcher, SportEntityWriter writer = null, MarketWriter marketWriter = null, ILogger log = null)
        {
            Guard.Argument(dispatcher, nameof(dispatcher)).NotNull();

            _dispatcher        = dispatcher;
            _sportEntityWriter = writer;
            _marketWriter      = marketWriter;
            _log = log ?? new NullLogger <EntityProcessor <T> >();
        }
示例#5
0
 /// <summary>
 /// </summary>
 /// <param name="da"/>
 /// <param name="aeqp"/>
 /// <param name="wips"/>
 /// <param name="dispatcher"/>
 /// <param name="handled"/>
 public void ON_DISPATCH0(DispatchingAgent da, AoEquipment aeqp, IList <IHandlingBatch> wips, IEntityDispatcher dispatcher, ref bool handled)
 {
 }