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 }); }