interFaceMessagePost msg = (interFaceMessagePost)list[i];
string url =msg.UrlPost +"?"+msg.UrlParameter;
URL=url;
ForderFormId=msg.ForderformID;
//新的编码之后的url
string _tempExpesion="";
//发出票成功消息
Regex ticket=new Regex("tickets=(.*)");
bool isHaveTicket=ticket.Match(url).Success;
if(isHaveTicket)
{
if(ticket.Match(url).Groups!=null && ticket.Match(url).Groups.Count>0)
{
_tempExpesion=ticket.Match(url).Groups[1].Value;
url=url.Replace(_tempExpesion,System.Web.HttpUtility.UrlEncode(_tempExpesion));
}
}
else
{
Regex refundDetail=new Regex("RefundDeatils=(.*)");
bool isHaveRefund=refundDetail.Match(url).Success;
if(isHaveRefund)
{
if(refundDetail.Match(url).Groups!=null && refundDetail.Match(url).Groups.Count>0)
{
_tempExpesion=refundDetail.Match(url).Groups[1].Value;
url=url.Replace(_tempExpesion,System.Web.HttpUtility.UrlEncode(_tempExpesion));
}
}
}
没有加try catch导致出错之后程序卡死