示例#1
0
文件: Market.cs 项目: BFMS/BFMS
        public Market(MarketBook book)
        {
            marketCatalogue = book.marketCatalogue;
            MarketId = book.MarketId;
            RefreshNr = book.RefreshNr;
            Status = book.Status.ToString();
            IsInplay = book.IsInplay;
            EventName = book.marketCatalogue.Event.Venue;
            Name = book.marketCatalogue.MarketName;
            Type = book.marketCatalogue.Description.MarketType;
            LocalStartDate = book.marketCatalogue.LocalStartTime.Date;
            LocalStartTime = book.marketCatalogue.LocalStartTime;
            NumberOfWinners = book.NumberOfWinners;
            NumberOfRunners = book.NumberOfRunners;
            NumberOfActiveRunners = book.NumberOfActiveRunners;
            Ovr = book.OVRLay;
            TotalMatched = book.TotalMatched;
            Runners = new List<MarketItem>();
            if (book.Runners != null)
            {
                foreach (Runner runner in book.Runners)
                {
                    MarketItem mi = new MarketItem(runner, book.marketCatalogue.Runners.Find(c => c.SelectionId == runner.SelectionId).RunnerName);
                    Runners.Add(mi);
                    if (runner.LastPrices != null)
                    {
                        runner.LastPrices = null;
                    }

                }
            }
        }
示例#2
0
文件: Market.cs 项目: BFMS/BFMS
 public Market(MarketCatalogue mc)
 {
     MarketId = mc.MarketId;
     EventName = mc.Event.Venue;
     Name = mc.MarketName;
     Type = mc.Description.MarketType;
     LocalStartDate = mc.LocalStartTime.Date;
     LocalStartTime = mc.LocalStartTime;
     Runners = new List<MarketItem>();
     mc.CheckRunnerStatus();
     foreach (RunnerDescription runner in mc.Runners)
     {
         if (runner.Status == RunnerStatus.ACTIVE)
         {
             MarketItem mi = new MarketItem(runner);
             Runners.Add(mi);
         }
     }
 }