Example #1
0
        private MarketRunner GetOrAdd(RunnerId rid)
        {
            MarketRunner runner;

            if (!_marketRunners.TryGetValue(rid, out runner))
            {
                runner = new MarketRunner(this, rid);
                _marketRunners[rid] = runner;
            }
            return(runner);
        }
Example #2
0
        private void OnOrderRunnerChange(OrderRunnerChange orderRunnerChange)
        {
            RunnerId          rid = new RunnerId(orderRunnerChange.Id, orderRunnerChange.Hc);
            OrderMarketRunner orderMarketRunner;

            if (!_marketRunners.TryGetValue(rid, out orderMarketRunner))
            {
                orderMarketRunner   = new OrderMarketRunner(this, rid);
                _marketRunners[rid] = orderMarketRunner;
            }
            //update the runner
            orderMarketRunner.OnOrderRunnerChange(orderRunnerChange);
        }
Example #3
0
        // override object.Equals
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            RunnerId runnerId = (RunnerId)obj;

            if (_selectionId != runnerId._selectionId)
            {
                return(false);
            }
            return(_handicap == runnerId._handicap);
        }
 public OrderMarketRunner(OrderMarket market, RunnerId runnerId)
 {
     _market   = market;
     _runnerId = runnerId;
 }
Example #5
0
 public MarketRunner(Market market, RunnerId runnerId)
 {
     _market   = market;
     _runnerId = runnerId;
 }