/// <summary>
        /// Call this function on a data reader to get that rows return status info.
        /// </summary>
        private static ReturnStatus ParseInternal(IColumnReader reader)
        {
            // check if the reader has return status info
            if (!Exists(reader))
            {
                return(null);
            }

            // first get the status
            string       status       = reader.GetString("status");
            ReturnStatus returnStatus = new ReturnStatus(status);

            // get the reason if it exists
            if (reader.HasValue("reason"))
            {
                returnStatus._reason = reader.GetString("reason");
            }

            // get i18n info
            if (reader.HasValue("context"))
            {
                returnStatus._context = reader.GetString("context");
            }
            if (reader.HasValue("appkey"))
            {
                returnStatus._appKey = reader.GetString("appkey");
            }

            return(returnStatus);
        }
Пример #2
0
 public TDSSqlResult(T value, ReturnStatus returnStatus)
 {
     ReturnStatus = returnStatus;
     Value        = value;
 }
Пример #3
0
 public TDSSqlResult(ReturnStatus returnStatus)
 {
     ReturnStatus = returnStatus;
 }
 public ReturnStatusException(ReturnStatus returnStatus) : base(returnStatus.Reason)
 {
     this._returnStatus = returnStatus;
 }