/// <summary> /// Converts a <see cref="BaseStationStatusCode"/> to a string. /// </summary> /// <param name="statusCode"></param> /// <returns></returns> public static string ConvertToString(BaseStationStatusCode statusCode) { switch (statusCode) { case BaseStationStatusCode.Delete: return("AD"); case BaseStationStatusCode.None: return(""); case BaseStationStatusCode.OK: return("OK"); case BaseStationStatusCode.PositionLost: return("PL"); case BaseStationStatusCode.Remove: return("RM"); case BaseStationStatusCode.SignalLost: return("SL"); default: throw new NotImplementedException(); } }
/// <summary> /// Converts a string to a <see cref="BaseStationStatusCode"/>. /// </summary> /// <param name="text"></param> /// <returns></returns> public static BaseStationStatusCode ConvertToBaseStationStatusCode(string text) { BaseStationStatusCode result = BaseStationStatusCode.None; if (!String.IsNullOrEmpty(text)) { switch (text) { case "PL": result = BaseStationStatusCode.PositionLost; break; case "SL": result = BaseStationStatusCode.SignalLost; break; case "RM": result = BaseStationStatusCode.Remove; break; case "AD": result = BaseStationStatusCode.Delete; break; case "OK": result = BaseStationStatusCode.OK; break; } } return(result); }
/// <summary> /// Converts a <see cref="BaseStationStatusCode"/> to a string. /// </summary> /// <param name="statusCode"></param> /// <returns></returns> public static string ConvertToString(BaseStationStatusCode statusCode) { string result = ""; switch (statusCode) { case BaseStationStatusCode.Delete: result = "AD"; break; case BaseStationStatusCode.None: break; case BaseStationStatusCode.OK: result = "OK"; break; case BaseStationStatusCode.PositionLost: result = "PL"; break; case BaseStationStatusCode.Remove: result = "RM"; break; case BaseStationStatusCode.SignalLost: result = "SL"; break; default: throw new NotImplementedException(); } return(result); }
/// <summary> /// Converts a <see cref="BaseStationStatusCode"/> to a string. /// </summary> /// <param name="statusCode"></param> /// <returns></returns> public static string ConvertToString(BaseStationStatusCode statusCode) { string result = ""; switch(statusCode) { case BaseStationStatusCode.Delete: result = "AD"; break; case BaseStationStatusCode.None: break; case BaseStationStatusCode.OK: result = "OK"; break; case BaseStationStatusCode.PositionLost: result = "PL"; break; case BaseStationStatusCode.Remove: result = "RM"; break; case BaseStationStatusCode.SignalLost: result = "SL"; break; default: throw new NotImplementedException(); } return result; }