예제 #1
0
파일: BaseApi.cs 프로젝트: limufan/EIM
 protected TResponse Post <TResponse>(object requestDto)
 {
     try
     {
         return(this._Post <TResponse>(requestDto));
     }
     catch
     {
         //执行出错检查可用服务器重新执行
         CheckServerResult checkServerResult = this.ApiManager.CheckServer();
         if (checkServerResult == CheckServerResult.ChangedServer)
         {
             return(this._Post <TResponse>(requestDto));
         }
         else
         {
             throw;
         }
     }
 }
예제 #2
0
파일: BaseApi.cs 프로젝트: limufan/EIM
 protected void Post(object requestDto)
 {
     try
     {
         this._Post(requestDto);
     }
     catch
     {
         //执行出错检查可用服务器重新执行
         CheckServerResult checkServerResult = this.ApiManager.CheckServer();
         if (checkServerResult == CheckServerResult.ChangedServer)
         {
             this._Post(requestDto);
         }
         else
         {
             throw;
         }
     }
 }