/// <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); }