コード例 #1
0
        static void Main(string[] args)
        {
            Alarm_Publisher    casio = new Alarm_Publisher();
            Student_Subscriber don   = new Student_Subscriber();

            don.Subscribe(casio);
            casio.Trigger();
        }
コード例 #2
0
        public void Subscribe(Alarm_Publisher alarm)
        {
            TimeToRise del1 = new TimeToRise(WakeUp);

            alarm.RingAlarm += del1;
        }