예제 #1
0
 /// <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;
     }
 }
예제 #2
0
        //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);
        }
예제 #3
0
 /// <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;
 }
예제 #4
0
 /// <summary>
 /// 指令结果解析适配器.
 /// </summary>
 /// <param name="Msg">指令结果集合.</param>
 /// <returns></returns>
 protected override ASyncResult ResultAdapter(string Msg)
 {
     SSResult Ss = new SSResult();
     ParsePnr(Ss, Msg);
     return Ss;
 }