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 DisconnectQCProjectStayLoggedIn() { CurrentDomain = null; CurrentProject = null; if (QcRestClient == null) { QcRestClient = new QCClient(ServerURL, UserName, Password); } if (!QcRestClient.IsAuthenticated()) { return(QcRestClient.Login()); } return(true); }
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()); }