public void Process(HttpRequest request, HttpResponse response) { var path = request.Url.AbsolutePath; var ps = path.Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries); string areaCity = ""; if (ps.Length > 1) { areaCity = ps[1]; } NameValueCollection nv = new NameValueCollection(); nv.Add(request.Form); nv.Add(request.QueryString); nv.Add("areaCity", areaCity); if (request.QueryString.Count == 1) { nv.Add("json", request.QueryString[0]); } NotifyObserver notify = new NotifyObserver(); notify.OnCancelIssue += notify_OnCancelIssue; notify.OnIssue += notify_OnIssue; notify.OnPaid += notify_OnPaid; notify.OnRefund += notify_OnRefund; notify.OnRefundTicket += notify_OnRefundTicket; var result = notify.Process(nv); response.WriteLine(result); }
public void RemoveObserver(NotifyObserver ob) { NotifyObserverEvent -= ob; }
public void AddObserver(NotifyObserver ob) { NotifyObserverEvent += ob; }