public static IEventMonitor Attach(System.ComponentModel.INotifyPropertyChanged eventSource, Type type) #endif { if (eventSource == null) { throw new ArgumentNullException(nameof(eventSource), "Cannot monitor the events of a <null> object."); } IEventMonitor eventMonitor; if (!Map.TryGetMonitor(eventSource, out eventMonitor)) { eventMonitor = new EventMonitor(eventSource); Map.Add(eventSource, eventMonitor); } eventMonitor.Attach(type); return eventMonitor; }