public void Close() { try { if (IsConnectionOk()) { ClientInstance.Close(); } } catch (Exception ex) { HandleException(); } }