public static bool IsJobIdMatch(this IRepairTask repairTask, ITenantJob tenantJob) { repairTask.Validate("repairTask"); tenantJob.Validate("tenantJob"); var jobId = repairTask.GetJobId(); bool isMatch = (jobId != null) && string.Equals(jobId, tenantJob.Id.ToString()); return(isMatch); }
public static bool IsJobKeyMatch(this IRepairTask repairTask, ITenantJob tenantJob) { repairTask.Validate("repairTask"); tenantJob.Validate("tenantJob"); var jobId = repairTask.GetJobId(); var jobKey = repairTask.GetJobKey(); bool jobKeyMatch = jobId != null && jobKey != null && string.Equals(jobKey, tenantJob.GetJobKey()); return(jobKeyMatch); }
/// <summary> /// Gets the job key which is a Azure JobId/UD combination corresponding to the repair task. /// </summary> private static string GetJobKey(this IRepairTask repairTask) { repairTask.Validate("repairTask"); var id = repairTask.GetJobId(); var stepId = repairTask.GetJobStepId(); if (string.IsNullOrWhiteSpace(id) || stepId == null) { return(null); } var key = Constants.JobKeyFormat.ToString(id, stepId); return(key); }