private void OnDisconnecting(InstanceEventArgs e) { var handler = Disconnecting; if (handler != null) handler(this, e); }