예제 #1
0
        public QvDataContractResponse createConnectionString(Dictionary <string, string> userParameters)
        {
            QvxLog.Log(QvxLogFacility.Application, QvxLogSeverity.Debug, "+ createConnectionString()");

            Info retVal;

            try
            {
                retVal = new QvInfo {
                    qMessage = "Connection string creation failed", qOk = false
                };

                if (userParameters.ContainsKey("qConnectionId"))
                {
                    retVal = new QvInfo {
                        qMessage = "qConnectionId=" + userParameters["qConnectionId"], qOk = true
                    };
                }
            }
            catch (Exception e)
            {
                QvxLog.Log(QvxLogFacility.Application, QvxLogSeverity.Error, "createConnectionString() : " + e.Message);
                throw e;
            }

            QvxLog.Log(QvxLogFacility.Application, QvxLogSeverity.Debug, "- createConnectionString()");

            return(retVal);
        }
예제 #2
0
        public QvDataContractResponse testConnection(IQlikConnector driver, Dictionary <string, string> userParameters)
        {
            QvxLog.Log(QvxLogFacility.Application, QvxLogSeverity.Debug, "+ testConnection()");

            Info retVal;

            try
            {
                retVal = new QvInfo {
                    qMessage = "Connection failed", qOk = false
                };

                if (driver.testConnection(userParameters))
                {
                    retVal = new QvInfo {
                        qMessage = "Connection OK!", qOk = true
                    };
                }
            }
            catch (Exception e)
            {
                QvxLog.Log(QvxLogFacility.Application, QvxLogSeverity.Error, "testConnection() : " + e.Message);
                throw e;
            }

            QvxLog.Log(QvxLogFacility.Application, QvxLogSeverity.Debug, "- testConnection()");

            return(retVal);
        }