예제 #1
0
 public override void Update(Subject s)
 {
     Console.WriteLine("{0} observed that {1} changed", GetType().Name, s.GetType().Name);
 }
예제 #2
0
 public void Update(Subject subject)
 {
     if (subject is SubjectConcrete)
     {
         Console.WriteLine("Notified {0} of {1}'s " + " values are '{2}' and '{3}'.", _name, subject.GetType().Name, subject.SomeValue, subject.SomeOtherValue);
     }
 }