/// <summary>
        ///     Disposes this object.
        ///     Does nothing if already disposed.
        /// </summary>
        public void Dispose()
        {
            if (_disposed)
            {
                return;
            }

            _disposed             = true;
            _client.Disconnected -= Client_Disconnected;
            _reconnectTimer.Stop();
        }
Beispiel #2
0
 /// <summary>
 ///     Handles Disconnected event of _communicationChannel object.
 /// </summary>
 /// <param name="sender">Source of event</param>
 /// <param name="e">Event arguments</param>
 private void CommunicationChannel_Disconnected(object sender, EventArgs e)
 {
     _pingTimer.Stop();
     OnDisconnected();
 }