private async Task GetDeviceCache() { _deviceCache = await GeotabAPI.GetDictionary <Device, Id>(d => d.Id); _deviceNameCache = _deviceCache.ToDictionary(d => d.Value.Name, d => d.Key); await UpdateProgress(40); }
private async Task GetCachedData() { var controller = GeotabAPI.GetDictionary <Controller, Id>(c => c.Id); var diagnostic = GeotabAPI.GetDictionary <Diagnostic, Id>(c => c.Id); var fmi = GeotabAPI.GetDictionary <FailureMode, Id>(f => f.Id); await Task.WhenAll(controller, diagnostic, fmi); _diagnosticCache = diagnostic.Result; _controllerCache = controller.Result; _fmiCache = fmi.Result; return; }