Beispiel #1
0
 internal void Handle(SiteAvailabilityRequest request) {
    var resp = new SiteAvailabilityResponse();
    if (MockupHelpers.IsActivated(request.DriverId)) {
       var res = new List<SiteAvailability>();
       foreach (var id in request.SiteIds) {
          if (SitesUpdateHandler.SitesCache.Select(s => s.Id).Contains(id)) {
             var r = new SiteAvailability {
                Availability = new Percent(_rndSiteAvailability.NextDouble()),
                SiteId = id,
                StdDev = Percent.Undefined,
                TimeFrame = TimeFrame.Unbounded,
             };
             res.Add(r);
          }
       }
       resp.Result.AddRange(res);
    }
    Reply(resp);
 }
Beispiel #2
0
 internal void Handle(SiteAvailabilityRequest request) {
    _handle(request);
 }