示例#1
0
        public void run()
        {
            Subject subj = new Subject();

            new googleMonitor(subj);
            new MicrosoftMonitor(subj);

            foreach (var x in new double[] { 1022, 256, 1485, 258 })
                subj.Price = x;
        }
示例#2
0
 public MicrosoftMonitor(Subject s)
 {
     s.subjectChange += new EventHandler<SubjectChangeEventArgs>(subject_change);
 }
示例#3
0
 public googleMonitor(Subject s)
 {
     s.subjectChange += new EventHandler<SubjectChangeEventArgs>(subject_change);
 }