private static void UpdateRepositoryObjects(FileSystemEventArgs e) { string str = null; DateTime dateTime; if (ScheduledJobSourceAdapter.GetJobRunInfo(e.Name, out str, out dateTime)) { ScheduledJob job = ScheduledJobSourceAdapter.JobRepository.GetJob(str, dateTime); if (job != null) { Job2 job2 = null; try { job2 = ScheduledJobSourceAdapter.LoadJobFromStore(str, dateTime); } catch (ScheduledJobException scheduledJobException) { } catch (DirectoryNotFoundException directoryNotFoundException) { } catch (FileNotFoundException fileNotFoundException) { } catch (UnauthorizedAccessException unauthorizedAccessException) { } catch (IOException oException) { } if (job2 != null) { job.Update(job2 as ScheduledJob); } return; } else { return; } } else { return; } }
private static void UpdateRepositoryObjects(FileSystemEventArgs e) { // Extract job run information from change file path. string updateDefinitionName; DateTime updateJobRun; if (!GetJobRunInfo(e.Name, out updateDefinitionName, out updateJobRun)) { System.Diagnostics.Debug.Assert(false, "All job run updates should have valid directory names."); return; } // Find corresponding job in repository. ScheduledJob updateJob = JobRepository.GetJob(updateDefinitionName, updateJobRun); if (updateJob == null) { return; } // Load updated job information from store. Job2 job = null; try { job = LoadJobFromStore(updateDefinitionName, updateJobRun); } catch (ScheduledJobException) { } catch (DirectoryNotFoundException) { } catch (FileNotFoundException) { } catch (UnauthorizedAccessException) { } catch (IOException) { } // Update job in repository based on new job store data. if (job != null) { updateJob.Update(job as ScheduledJob); } }