/// <summary> /// Parses the PNR. /// </summary> /// <param name="Ss">The ss.</param> /// <param name="Msg">The MSG.</param> private void ParsePnr(SSResult Ss, string Msg) { if (Regex.IsMatch(Msg, @"\s*(\w{6})\s+(\-)+\s*", RegexOptions.IgnoreCase | RegexOptions.Multiline)) { Ss.getPnr = Regex.Match(Msg, @"\s*(\w{6})\s+(\-)+\s*", RegexOptions.Multiline | RegexOptions.IgnoreCase).Groups[1].Value; } }
//private bool __IsSpecial = false; #endregion #region 重写部分 /// <summary> /// 指令结果解析适配器. /// </summary> /// <param name="Msg">指令结果集合.</param> /// <returns></returns> protected override ASyncResult ResultAdapter(string Msg) { SSResult Ss = new SSResult(); ParsePnr(Ss, Msg); return(Ss); }
/// <summary> /// Parses the PNR. /// </summary> /// <param name="Ss">The ss.</param> /// <param name="Msg">The MSG.</param> private void ParsePnr(SSResult Ss, string Msg) { if (Regex.IsMatch(Msg, @"\s*(\w{6})\s+(\-)+\s*", RegexOptions.IgnoreCase | RegexOptions.Multiline)) Ss.getPnr = Regex.Match(Msg, @"\s*(\w{6})\s+(\-)+\s*", RegexOptions.Multiline | RegexOptions.IgnoreCase).Groups[1].Value; }
/// <summary> /// 指令结果解析适配器. /// </summary> /// <param name="Msg">指令结果集合.</param> /// <returns></returns> protected override ASyncResult ResultAdapter(string Msg) { SSResult Ss = new SSResult(); ParsePnr(Ss, Msg); return Ss; }