예제 #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());
        }
예제 #2
0
        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);
        }
예제 #3
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());
        }