public string ProcessRequest(string mProxyID, string controller, string method, string jsondata) { //WcfServerManage.hostwcfMsg.BeginInvoke(DateTime.Now, mProxyID, null, null);//异步方式不影响后台数据请求 //Thread.Sleep(40000);//测试并发问题, 此处没有问题 return(WcfServerManage.ProcessRequest(mProxyID, controller, method, jsondata)); }
//异步请求 public IAsyncResult BeginProcessRequest(string clientId, string controller, string method, string jsondata, AsyncCallback callback, object asyncState) { string pluginname = null; string cname = null; string[] names = controller.Split(new char[] { '@' }); if (names.Length == 2) { pluginname = names[0]; cname = names[1]; } HeaderParameter para = HeaderOperater.GetHeaderValue(OperationContext.Current.RequestContext.RequestMessage); return(new CompletedAsyncResult <string>(WcfServerManage.ProcessRequest(clientId, pluginname, cname, method, jsondata, para))); }
//服务请求 public string ProcessRequest(string clientId, string controller, string method, string jsondata) { string pluginname = null; string cname = null; string[] names = controller.Split(new char[] { '@' }); if (names.Length == 2) { pluginname = names[0]; cname = names[1]; } HeaderParameter para = HeaderOperater.GetHeaderValue(OperationContext.Current.RequestContext.RequestMessage); return(WcfServerManage.ProcessRequest(clientId, pluginname, cname, method, jsondata, para)); }
//异步请求 public IAsyncResult BeginProcessRequest(string mProxyID, string controller, string method, string jsondata, AsyncCallback callback, object asyncState) { return(new CompletedAsyncResult <string>(WcfServerManage.ProcessRequest(mProxyID, controller, method, jsondata))); }
public string ProcessRequest(string mProxyID, string controller, string method, string jsondata) { return(WcfServerManage.ProcessRequest(mProxyID, controller, method, jsondata)); }