示例#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);
        }
示例#2
0
 public VegaMoveDeviceDataController(IMovingDeviceDataRepository repository)
 {
     _repository = repository;
 }