Пример #1
0
        private void MonitoringObject_ReactorMeltdown(object sender, EventArgs e)
        {
            MeltdownInfo i = e as MeltdownInfo;

            Console.WriteLine("Meltdown detected, core temperature is: " + i.CoreTemperature);
            DispatchTeam();
        }
Пример #2
0
        static void Main(string[] args)
        {
            NuclearReactor halfLife            = new NuclearReactor();
            CrisisCenter   FEAR                = new CrisisCenter(halfLife);
            MeltdownInfo   currentReactorState = new MeltdownInfo(2500);

            halfLife.OnReactorMeltdown(currentReactorState);
            Console.ReadKey();
        }
 public void OnReactorMeltdown(MeltdownInfo i)
 {
     Console.WriteLine("Sh*t happens: reactor core meltdown!");
     ReactorMeltdown?.Invoke(this, i);
 }