public static bool ConnectQCServer(string qcServerUrl, string qcUserName, string qcPassword) { if (QcRestClient == null || qcServerUrl != ServerURL || qcUserName != UserName || qcPassword != Password) { QcRestClient = new QCClient(qcServerUrl, qcUserName, qcPassword); } ServerURL = qcServerUrl; UserName = qcUserName; Password = qcPassword; return(QcRestClient.Login()); }
public static bool ConnectQCServer(string qcServerUrl, string qcUserName, string qcPassword) { string validateQcServerUrl = qcServerUrl; if (validateQcServerUrl.ToLowerInvariant().EndsWith("qcbin")) { validateQcServerUrl = qcServerUrl.Remove(qcServerUrl.Length - 5); } if (QcRestClient == null || validateQcServerUrl != ServerURL || qcUserName != UserName || qcPassword != Password) { QcRestClient = new QCClient(validateQcServerUrl, qcUserName, qcPassword); } ServerURL = validateQcServerUrl; UserName = qcUserName; Password = qcPassword; return(QcRestClient.Login()); }