internal void Handle(PeriodicUpdateRequest request) { var resp = new PeriodicUpdateResponse() { ResponderVersion = Assembly.GetEntryAssembly().GetName().Version }; if (MockupHelpers.IsActivated(request.DriverId)) { foreach (var utype in Enum.GetValues(typeof(VehicleUpdateTypes)).Cast<VehicleUpdateTypes>().Skip(1)) { if (!PendingUpdateTypes.Has(utype)) continue; if (utype == VehicleUpdateTypes.SitesUpdate) { if (request.GetRequestorVersion(VehicleUpdateTypes.SitesUpdate) == SitesUpdateHandler.CurrentSitesVersion) continue; } if (utype == VehicleUpdateTypes.SoftwareUpdate) { var reqver = request.GetRequestorVersion(VehicleUpdateTypes.SoftwareUpdate); var respver = MockupHelpers.LookupVersion(request.ClientId); if (respver == null) continue; // we deliberately don't compare versions here, to mimic CC behavior // in CC, the version test is not done, they just check SW update bit for a particular user // and the actual version-to-version testing is postponent to SoftwareUpdateAvailabilityRequest } resp.AvailableUpdates.Add(new PeriodicUpdate { UpdateType = utype, UpdateId = Guid.NewGuid() }); } } Reply(resp); }
internal void Handle(PeriodicUpdateRequest request) { _handle(request); }