示例#1
0
 private Response ChannelFindByCoordinates(PlaceByCoordinates request, int retry = 0)
 {
     try
     {
         return(Channel.FindByCoordinates(request.Location, request.Locale,
                                          request.Start, request.Count, request.Offset,
                                          request.GetFlagsAsString(), request.GetGFlagsAsString(),
                                          request.AppId));
     }
     catch (ProtocolException ex)
     {
         if (retry < RetryLimit && ex.InnerException is WebException)
         {
             return(ChannelFindByCoordinates(request, ++retry));
         }
         throw;
     }
     catch (CommunicationException ex)
     {
         if (retry < RetryLimit && ex.Message == "Server Error")
         {
             return(ChannelFindByCoordinates(request, ++retry));
         }
         throw;
     }
 }