Skip to content

Commit 457bb88

Browse files
committed
fb
1 parent 03f5b45 commit 457bb88

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

src/ScheduledTasks/Models/ScheduleConfiguration.cs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,43 +127,50 @@ public HashSet<string> Update(ScheduleUpdateOptions updateOptions)
127127
Check.NotNull(updateOptions, nameof(updateOptions));
128128
HashSet<string> updatedFields = new HashSet<string>();
129129

130-
if (!string.IsNullOrEmpty(updateOptions.OrchestrationName))
130+
if (!string.IsNullOrEmpty(updateOptions.OrchestrationName)
131+
&& updateOptions.OrchestrationName != this.OrchestrationName)
131132
{
132133
this.OrchestrationName = updateOptions.OrchestrationName;
133134
updatedFields.Add(nameof(this.OrchestrationName));
134135
}
135136

136-
if (!string.IsNullOrEmpty(updateOptions.OrchestrationInput))
137+
if (!string.IsNullOrEmpty(updateOptions.OrchestrationInput)
138+
&& updateOptions.OrchestrationInput != this.OrchestrationInput)
137139
{
138140
this.OrchestrationInput = updateOptions.OrchestrationInput;
139141
updatedFields.Add(nameof(this.OrchestrationInput));
140142
}
141143

142-
if (!string.IsNullOrEmpty(updateOptions.OrchestrationInstanceId))
144+
if (!string.IsNullOrEmpty(updateOptions.OrchestrationInstanceId)
145+
&& updateOptions.OrchestrationInstanceId != this.OrchestrationInstanceId)
143146
{
144147
this.OrchestrationInstanceId = updateOptions.OrchestrationInstanceId;
145148
updatedFields.Add(nameof(this.OrchestrationInstanceId));
146149
}
147150

148-
if (updateOptions.StartAt.HasValue)
151+
if (updateOptions.StartAt.HasValue
152+
&& updateOptions.StartAt != this.StartAt)
149153
{
150154
this.StartAt = updateOptions.StartAt;
151155
updatedFields.Add(nameof(this.StartAt));
152156
}
153157

154-
if (updateOptions.EndAt.HasValue)
158+
if (updateOptions.EndAt.HasValue
159+
&& updateOptions.EndAt != this.EndAt)
155160
{
156161
this.EndAt = updateOptions.EndAt;
157162
updatedFields.Add(nameof(this.EndAt));
158163
}
159164

160-
if (updateOptions.Interval.HasValue)
165+
if (updateOptions.Interval.HasValue
166+
&& updateOptions.Interval != this.Interval)
161167
{
162168
this.Interval = updateOptions.Interval.Value;
163169
updatedFields.Add(nameof(this.Interval));
164170
}
165171

166-
if (updateOptions.StartImmediatelyIfLate.HasValue)
172+
if (updateOptions.StartImmediatelyIfLate.HasValue
173+
&& updateOptions.StartImmediatelyIfLate != this.StartImmediatelyIfLate)
167174
{
168175
this.StartImmediatelyIfLate = updateOptions.StartImmediatelyIfLate.Value;
169176
updatedFields.Add(nameof(this.StartImmediatelyIfLate));

0 commit comments

Comments
 (0)