/// <summary> /// Requests the same events as those in <paramref name="source"/> Bro connection. /// </summary> /// <param name="source">Source <see cref="BroConnection"/> to adopt events from.</param> /// <exception cref="ArgumentNullException"><paramref name="source"/> is <c>null</c>.</exception> /// <exception cref="ObjectDisposedException">Cannot adopt events, <see cref="BroConnection"/> is disposed.</exception> public void AdoptEvents(BroConnection source) { if ((object)source == null) { throw new ArgumentNullException("source"); } if (m_connectionPtr.IsInvalid() || source.m_connectionPtr.IsInvalid()) { throw new ObjectDisposedException("Cannot adopt events, Bro connection is disposed."); } BroApi.bro_conn_adopt_events(source.m_connectionPtr, m_connectionPtr); }