Skip to content

Commit 7922269

Browse files
sophiatevSophia Tevosyan
andauthored
Reverting breaking change regarding methods with optional parameters (#1222)
* first commit * made some parameters nonoptional for the new methods * reverting to all optional parameters --------- Co-authored-by: Sophia Tevosyan <stevosyan@microsoft.com>
1 parent 6674c79 commit 7922269

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

src/DurableTask.Core/Entities/ClientEntityHelpers.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,20 @@ namespace DurableTask.Core.Entities
2525
/// </summary>
2626
public static class ClientEntityHelpers
2727
{
28+
/// <summary>
29+
/// Create an event to represent an entity signal.
30+
/// </summary>
31+
/// <param name="targetInstance">The target instance.</param>
32+
/// <param name="requestId">A unique identifier for the request.</param>
33+
/// <param name="operationName">The name of the operation.</param>
34+
/// <param name="input">The serialized input for the operation.</param>
35+
/// <param name="scheduledTimeUtc">The time to schedule this signal, or null if not a scheduled signal</param>
36+
/// <returns>The event to send.</returns>
37+
public static EntityMessageEvent EmitOperationSignal(OrchestrationInstance targetInstance, Guid requestId, string operationName, string? input, (DateTime Original, DateTime Capped)? scheduledTimeUtc)
38+
{
39+
return EmitOperationSignal(targetInstance, requestId, operationName, input, scheduledTimeUtc, parentTraceContext: null, requestTime: null, createTrace: false);
40+
}
41+
2842
/// <summary>
2943
/// Create an event to represent an entity signal.
3044
/// </summary>

src/DurableTask.Core/Entities/OrchestrationEntityContext.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,27 @@ public IEnumerable<EntityMessageEvent> EmitLockReleaseMessages()
219219
}
220220
}
221221

222+
/// <summary>
223+
/// Creates a request message to be sent to an entity.
224+
/// </summary>
225+
/// <param name="target">The target entity.</param>
226+
/// <param name="operationName">The name of the operation.</param>
227+
/// <param name="oneWay">If true, this is a signal, otherwise it is a call.</param>
228+
/// <param name="operationId">A unique identifier for this request.</param>
229+
/// <param name="scheduledTimeUtc">A time for which to schedule the delivery, or null if this is not a scheduled message</param>
230+
/// <param name="input">The operation input</param>
231+
/// <returns>The event to send.</returns>
232+
public EntityMessageEvent EmitRequestMessage(
233+
OrchestrationInstance target,
234+
string operationName,
235+
bool oneWay,
236+
Guid operationId,
237+
(DateTime Original, DateTime Capped)? scheduledTimeUtc,
238+
string? input)
239+
{
240+
return EmitRequestMessage(target, operationName, oneWay, operationId, scheduledTimeUtc, input, requestTime: null, createTrace: false);
241+
}
242+
222243
/// <summary>
223244
/// Creates a request message to be sent to an entity.
224245
/// </summary>

0 commit comments

Comments
 (0)