Esempio n. 1
0
        public string ExecuteRQLRaw(string query, RQL.IODataFormat ioDataFormat)
        {
            string tmpQuery = query.Replace(RQL.SESSIONKEY_PLACEHOLDER, "#" + _sessionKeyStr);
            string rqlQuery;
            switch (ioDataFormat)
            {
                case RQL.IODataFormat.SessionKeyAndLogonGuid:
                    rqlQuery = string.Format(RQL_IODATA_SESSIONKEY, _loginGuidStr, _sessionKeyStr, tmpQuery);
                    break;
                case RQL.IODataFormat.LogonGuidOnly:
                    rqlQuery = string.Format(RQL_IODATA_LOGONGUID, _loginGuidStr, tmpQuery);
                    break;
                case RQL.IODataFormat.Plain:
                    rqlQuery = string.Format(RQL_IODATA, tmpQuery);
                    break;
                case RQL.IODataFormat.SessionKeyInProjectElement:
                    rqlQuery = string.Format(RQL_IODATA_PROJECT_SESSIONKEY, _loginGuidStr, _sessionKeyStr, tmpQuery);
                    break;
                case RQL.IODataFormat.FormattedText:
                    rqlQuery = string.Format(RQL_IODATA_FORMATTED_TEXT, _loginGuidStr, _sessionKeyStr, tmpQuery);
                    break;

                case RQL.IODataFormat.SessionKeyOnly:
                    rqlQuery = string.Format(RQL_IODATA_SESSIONKEY_ONLY, _sessionKeyStr, tmpQuery);
                    break;
                default:
                    throw new ArgumentException(String.Format("Unknown RQL.IODataFormat: {0}", ioDataFormat));
            }
            return SendRQLToServer(rqlQuery);
        }
Esempio n. 2
0
 public XmlDocument ExecuteRQL(string query, RQL.IODataFormat format)
 {
     string result = ExecuteRQLRaw(query, format);
     return ParseRQLResult(this, result);
 }