protected virtual void OnTemperatureChanged(TemperatureChangedEventArgs e) { if (TemperatureChanged != null) { TemperatureChanged(this, e); } }
protected void TemperatureChangeHandler(object sender, TemperatureChangedEventArgs args) { Console.WriteLine($"{this.GetType().Name} observed {args.Temperature}"); }