예제 #1
0
        /// <summary>
        /// Perform temperature-dependent calculations.
        /// </summary>
        protected void Temperature()
        {
            var args = new TemperatureStateEventArgs(_temperature);

            OnBeforeTemperature(args);
            foreach (var behavior in _temperatureBehaviors)
            {
                behavior.Temperature();
            }
            OnAfterTemperature(args);
        }
예제 #2
0
 /// <summary>
 /// Raises the <see cref="AfterTemperature" /> event.
 /// </summary>
 /// <param name="args">The <see cref="TemperatureStateEventArgs"/> instance containing the event data.</param>
 protected virtual void OnAfterTemperature(TemperatureStateEventArgs args) => AfterTemperature?.Invoke(this, args);
예제 #3
0
 /// <summary>
 /// Raises the <see cref="BeforeTemperature" /> event.
 /// </summary>
 /// <param name="args">The <see cref="TemperatureStateEventArgs"/> instance containing the event data.</param>
 protected virtual void OnBeforeTemperature(TemperatureStateEventArgs args) => BeforeTemperature?.Invoke(this, args);