Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public async Task <IEnumerable <VegaMoveDeviceData> > GetAsync(string id)
 {
     return(await _communiactor
            .GetMoveDeviceDataAsync(id, 0, DateTimeOffset.FromUnixTimeMilliseconds(0))
            .ConfigureAwait(false));
 }