コード例 #1
0
        protected virtual void OnWeatherChanger(WeatherChangedArgs args)
        {
            if (args == null)
            {
                throw new ArgumentNullException(nameof(args));
            }

            this.WeatherChanged?.Invoke(this, args);
        }
コード例 #2
0
        public void MeasurementsChange(int temperature, int humidity, int pressure)
        {
            var args = new WeatherChangedArgs(temperature, humidity, pressure);

            this.OnWeatherChanger(args);
        }