private T ExecuteJobSchedulerOperation <T>( string operationName, JobScheduler.JobSchedulerOperation <T> operation, bool retryOnError) { int num = 0; for (int index = 0; index < JobScheduler.Settings.RetryCount; ++index) { ++num; try { this.Instantiate(); return(operation()); } catch (TimeoutException ex) { JobScheduler.log.WarnFormat("{0}: JobScheduler channel threw TimeoutException. Retries: {1}", (object)operationName, (object)index); JobScheduler.log.Warn((object)"Job Scheduler Exception:", (Exception)ex); Thread.Sleep(JobScheduler.Settings.RetryInterval); } catch (ActionNotSupportedException ex) { JobScheduler.log.WarnFormat("{0}: JobScheduler channel threw ActionNotSupportedException", (object)operationName); JobScheduler.log.Warn((object)"Job Scheduler Exception:", (Exception)ex); throw; } catch (FaultException ex) { JobScheduler.log.WarnFormat("{0}: JobScheduler channel threw FaultException", (object)operationName); JobScheduler.log.Warn((object)"Job Scheduler Exception:", (Exception)ex); throw; } catch (CommunicationException ex) { JobScheduler.log.WarnFormat("{0}: JobScheduler channel threw CommunicationException. Retries: {1}", (object)operationName, (object)index); JobScheduler.log.Warn((object)"Job Scheduler Exception:", (Exception)ex); Thread.Sleep(JobScheduler.Settings.RetryInterval); } if (!retryOnError) { break; } } JobScheduler.log.ErrorFormat("{0}: Could not reach JobScheduler service at {1} after {2} retries", (object)operationName, (object)BusinessLayerSettings.Instance.JobSchedulerEndpointNetPipe, (object)num); throw new ApplicationException(string.Format("Could not reach JobScheduler service after {0} retries", (object)num)); }
// Token: 0x0600032D RID: 813 RVA: 0x00013FD0 File Offset: 0x000121D0 private T ExecuteJobSchedulerOperation <T>(string operationName, JobScheduler.JobSchedulerOperation <T> operation, bool retryOnError) { int num = 0; int i = 0; while (i < JobScheduler.Settings.RetryCount) { num++; try { this.Instantiate(); return(operation()); } catch (TimeoutException ex) { JobScheduler.log.WarnFormat("{0}: JobScheduler channel threw TimeoutException. Retries: {1}", operationName, i); JobScheduler.log.Warn("Job Scheduler Exception:", ex); Thread.Sleep(JobScheduler.Settings.RetryInterval); } catch (ActionNotSupportedException ex2) { JobScheduler.log.WarnFormat("{0}: JobScheduler channel threw ActionNotSupportedException", operationName); JobScheduler.log.Warn("Job Scheduler Exception:", ex2); throw; } catch (FaultException ex3) { JobScheduler.log.WarnFormat("{0}: JobScheduler channel threw FaultException", operationName); JobScheduler.log.Warn("Job Scheduler Exception:", ex3); throw; } catch (CommunicationException ex4) { JobScheduler.log.WarnFormat("{0}: JobScheduler channel threw CommunicationException. Retries: {1}", operationName, i); JobScheduler.log.Warn("Job Scheduler Exception:", ex4); Thread.Sleep(JobScheduler.Settings.RetryInterval); } if (retryOnError) { i++; continue; } break; } JobScheduler.log.ErrorFormat("{0}: Could not reach JobScheduler service at {1} after {2} retries", operationName, BusinessLayerSettings.Instance.JobSchedulerEndpointNetPipe, num); throw new ApplicationException(string.Format("Could not reach JobScheduler service after {0} retries", num)); }
private T ExecuteJobSchedulerOperation <T>( string operationName, JobScheduler.JobSchedulerOperation <T> operation) { return(this.ExecuteJobSchedulerOperation <T>(operationName, operation, true)); }