コード例 #1
0
        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);
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
 public async Task Handle(DataPointSavedNotification notification, CancellationToken cancellationToken)
 {
     var flatDataPointDto = mapper.Map <FlatDataPointDto>(notification.DataPoint);
     await dataPointPublisher.Publish(flatDataPointDto);
 }