Exemplo n.º 1
0
        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());
        }
Exemplo n.º 2
0
        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());
        }