예제 #1
0
 public void UnregisterObserver(ObserverProxy observerProxy)
 {
     var registerMethod = _subject.GetType().GetMethods().Single(m => m.CustomAttributes.Any(a => a.AttributeType == typeof(UnregisterObserverAttribute)));
     registerMethod.Invoke(_subject, new[] { observerProxy.Proxy });
 }
 public void UnregisterObserver(ObserverProxy observerProxy)
 {
     var registerMethod = _subject.GetType().GetMethods().Single(m => m.CustomAttributes.Any(a => a.AttributeType == typeof(UnregisterObserverAttribute)));
     registerMethod.Invoke(_subject, new[] { observerProxy.Proxy });
 }