private async Task UpdateMoveDataAsync(IMovingDeviceDataRepository repository, VegaDevice device) { var lastUpdateTime = await repository .GetLastUpdateTime(device.Id, _cancellationToken) .ConfigureAwait(false); var vegaServerLoadedData = await communicator .GetMoveDeviceDataAsync(device.Eui, device.Id, lastUpdateTime, _cancellationToken) .ConfigureAwait(false); await repository .AddVegaMovingDeviceDataAsync(vegaServerLoadedData, _cancellationToken) .ConfigureAwait(false); }
public async Task <IEnumerable <VegaMoveDeviceData> > GetAsync(string id) { return(await _communiactor .GetMoveDeviceDataAsync(id, 0, DateTimeOffset.FromUnixTimeMilliseconds(0)) .ConfigureAwait(false)); }