SHARE
TWEET

Untitled

a guest Oct 20th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private void DeleteJob(SPFeatureReceiverProperties properties)
  2.         {
  3.             SPSecurity.RunWithElevatedPrivileges(delegate () {
  4.                 SPSite site = properties.Feature.Parent as SPSite;
  5.  
  6.                 // delete the job  
  7.                 site.WebApplication.JobDefinitions.Where(t => t.Name.Equals(jobName)).ToList().ForEach(j => j.Delete());
  8.             });
  9.         }
RAW Paste Data
Top