Skip to content

Commit

Permalink
refactor: Remove "this" when not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdotnet committed Oct 29, 2024
1 parent 999ef41 commit 9bc18eb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public NCronJobOptionBuilder AddJob(
TimeZoneInfo = timeZoneInfo ?? TimeZoneInfo.Utc
};

this.jobRegistry.AddDynamicJob(jobDelegate, jobName, jobOption);
jobRegistry.AddDynamicJob(jobDelegate, jobName, jobOption);

return this;
}
Expand Down
4 changes: 2 additions & 2 deletions src/NCronJob/Registry/RuntimeJobRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ public void AddJob(Action<NCronJobOptionBuilder> jobBuilder)
var builder = new NCronJobOptionBuilder(services, concurrencySettings, jobRegistry);
jobBuilder(builder);

foreach (var jobDefinition in this.jobRegistry.GetAllJobs())
foreach (var jobDefinition in jobRegistry.GetAllJobs())
{
jobWorker.ScheduleJob(jobDefinition);
jobQueueManager.SignalJobQueue(jobDefinition.JobFullName);
}

foreach (var entry in this.jobRegistry.DynamicJobRegistrations)
foreach (var entry in jobRegistry.DynamicJobRegistrations)
{
jobQueueManager.SignalJobQueue(entry.JobDefinition.JobFullName);
}
Expand Down
4 changes: 2 additions & 2 deletions src/NCronJob/RetryPolicies/RetryPolicyAttribute.generic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public RetryPolicyAttribute(int retryCount = 3, double delayFactor = 2)
{
ArgumentOutOfRangeException.ThrowIfNegativeOrZero(retryCount);
ArgumentOutOfRangeException.ThrowIfNegative(delayFactor);
this.DelayFactor = delayFactor;
this.RetryCount = retryCount;
DelayFactor = delayFactor;
RetryCount = retryCount;
}
}

0 comments on commit 9bc18eb

Please sign in to comment.