public async Task Tension(DataPoint <Single> dataPoint) { _logger.Information($"DataPoint received for '{dataPoint.TimeSeries}' with value '{dataPoint.Measurement.Value}' generated @ '{dataPoint.Timestamp}'"); dataPoint.Measurement.Value *= 10; await _publisher.Publish(dataPoint); }
protected override void OnReceive(object message) { if (message is DataPoint dataPoint) { _dataPointPublisher.Publish(dataPoint); LogManager.Instance.Info($"Published datapoint {dataPoint}"); } else { LogManager.Instance.Error($"Invalid message received {message.GetType()} {message}"); Unhandled(message); } }
public async Task Handle(DataPointSavedNotification notification, CancellationToken cancellationToken) { var flatDataPointDto = mapper.Map <FlatDataPointDto>(notification.DataPoint); await dataPointPublisher.Publish(flatDataPointDto); }