public void Unregister(IDataReceivedEventHandler eventHandler) { if (_dataReceivedEventHandlers != null) { _dataReceivedEventHandlers.Remove(eventHandler); } }
public void Register(IDataReceivedEventHandler eventHandler) { if (_dataReceivedEventHandlers == null) { _dataReceivedEventHandlers = new HashSet<IDataReceivedEventHandler>(); } _dataReceivedEventHandlers.Add(eventHandler); }