public override void ExecuteCmdlet() { ConfirmAction( Force.IsPresent, string.Format(Resources.RemoveJobCollectionWarning, JobCollectionName), Resources.RemoveJobCollectionMessage, JobCollectionName, () => { WriteObject(SMClient.DeleteJobCollection(region: Location, jobCollection: JobCollectionName), true); }); }
public override void ExecuteCmdlet() { ConfirmAction( Force.IsPresent, string.Format(Resources.RemoveJobCollectionWarning, JobCollectionName), Resources.RemoveJobCollectionMessage, JobCollectionName, () => { if (!string.IsNullOrEmpty(Location) && !SMClient.GetAvailableRegions().Contains(Location, StringComparer.OrdinalIgnoreCase)) { throw new Exception(Resources.SchedulerInvalidLocation); } else { WriteObject(SMClient.DeleteJobCollection(region: Location, jobCollection: JobCollectionName), true); } }); }