Пример #1
0
        public IDisposable SubscribeOnDraw(int id, ISuperexpressDrawObserver observer)
        {
            var draw = Storage.SuperexpressDraws
                       .Select(x => new SuperexpressDrawModel
            {
                Id               = x.Id,
                SuperexpressId   = x.SuperexpressId,
                Name             = x.Name,
                EndBetsDateUtc   = x.EndBetsDate,
                StartBetsDateUtc = x.StartBetsDate,
                Events           = x.Events
            })
                       .First(x => x.Id == id);

            observer.PopulateDraw(draw);
            observers.Add(observer);
            return(new DisposableObject());
        }
Пример #2
0
        public IDisposable SubscribeOnDraw(int id, ISuperexpressDrawObserver observer)
        {
            //observer.PopulateDraw(new SuperexpressDrawModel
            //{
            //    Events = Enumerable.Range(1, 15).Select(x => new SuperexpressEventModel
            //    {
            //        ID = (x + 1) * 1234,
            //        Outcomes = Enumerable.Range(1, 5).Select(c => new CoefficientModel { Id = c,  Name = "outcome " + c, Value = c * 1.25f }).ToArray(),
            //        Name = "Event " + x,
            //        StartTime = DateTime.Now,
            //        BranchPathName = "path/path/path"
            //    }).ToArray(),
            //    Name = "DRAW",
            //    SuperexpressId = id + 250,
            //    Id = id,
            //    StartBetsDateUtc = DateTime.Now,
            //    EndBetsDateUtc = DateTime.Now
            //});

            return(null);
        }