コード例 #1
0
        public IDisposable SubscribeOnEventsInfo(IEventInfoObserver observer)
        {
            var events = Enumerable.Range(1, 53 * 4)
                         .Select(x => new EventInfo
            {
                ID         = x,
                DomainKind = (DomainKind)(x % 53),
                Name       = EventNames[x % 6]
            })
                         .ToArray();


            observer.PopulateEventInfo(events);
            return(null);
        }
コード例 #2
0
 public IDisposable SubscribeOnEventsInfo(IEventInfoObserver observer)
 {
     observer.PopulateEventInfo(Storage.Events.Select(x => new EventInfo
     {
         ID              = x.ID,
         DomainKind      = x.DomainKind,
         IsIncludedInBet = false,
         IsLiveEvent     = x.IsLiveEvent,
         Name            = x.Name,
         StartTime       = x.StartTime
     })
                                .ToArray());
     observers.Add(observer);
     return(new DisposableObject());
 }