Beispiel #1
0
 public static DCResult HttpInvoke(string product, DCMethodTypes methodType, string apiName, params object[] datas)
 {
     try
     {
         string     projectName = $"dc_{product.ToLower()}_{methodType.ToString().ToLower()}";
         CallResult callResult  = WebHttpClient.InvokeHttp("dc2016", projectName, apiName, HttpMethod.Get, datas);
         return(new DCResult(callResult));
     }
     catch (Exception ex)
     {
         throw new Exception($"调用DC发生异常({product},{methodType},{apiName})", ex);
     }
 }
Beispiel #2
0
 public DCRequest(DCProdTypes prodType, DCMethodTypes methodType)
 {
     this.ProdType   = prodType.ToString();
     this.MethodType = methodType.ToString();
 }