private void UpdateSubscribers() { TemperatureUpdated updateMessage = new TemperatureUpdated(_id, _temperature, _readingTime); foreach (var subscriber in _subscribers) { subscriber.Tell(updateMessage); } }
void OnTemperatureUpdated(double temperature) { TemperatureUpdated?.Invoke(null, new TemperatureUpdatedEventArgs { NewTemperature = temperature }); }