protected virtual void OnConnectionStateChanged(ConnectionStateChangedEventArgs e) { var handler = ConnectionStateChanged; if (handler != null) { handler(this, e); } }