Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/DurableTask.Core/Entities/ClientEntityHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ namespace DurableTask.Core.Entities
/// </summary>
public static class ClientEntityHelpers
{
/// <summary>
/// Create an event to represent an entity signal.
/// </summary>
/// <param name="targetInstance">The target instance.</param>
/// <param name="requestId">A unique identifier for the request.</param>
/// <param name="operationName">The name of the operation.</param>
/// <param name="input">The serialized input for the operation.</param>
/// <param name="scheduledTimeUtc">The time to schedule this signal, or null if not a scheduled signal</param>
/// <returns>The event to send.</returns>
public static EntityMessageEvent EmitOperationSignal(OrchestrationInstance targetInstance, Guid requestId, string operationName, string? input, (DateTime Original, DateTime Capped)? scheduledTimeUtc)
{
return EmitOperationSignal(targetInstance, requestId, operationName, input, scheduledTimeUtc, parentTraceContext: null, requestTime: null, createTrace: false);
}

/// <summary>
/// Create an event to represent an entity signal.
/// </summary>
Expand Down
21 changes: 21 additions & 0 deletions src/DurableTask.Core/Entities/OrchestrationEntityContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,27 @@ public IEnumerable<EntityMessageEvent> EmitLockReleaseMessages()
}
}

/// <summary>
/// Creates a request message to be sent to an entity.
/// </summary>
/// <param name="target">The target entity.</param>
/// <param name="operationName">The name of the operation.</param>
/// <param name="oneWay">If true, this is a signal, otherwise it is a call.</param>
/// <param name="operationId">A unique identifier for this request.</param>
/// <param name="scheduledTimeUtc">A time for which to schedule the delivery, or null if this is not a scheduled message</param>
/// <param name="input">The operation input</param>
/// <returns>The event to send.</returns>
public EntityMessageEvent EmitRequestMessage(
OrchestrationInstance target,
string operationName,
bool oneWay,
Guid operationId,
(DateTime Original, DateTime Capped)? scheduledTimeUtc,
string? input)
{
return EmitRequestMessage(target, operationName, oneWay, operationId, scheduledTimeUtc, input, requestTime: null, createTrace: false);
}

/// <summary>
/// Creates a request message to be sent to an entity.
/// </summary>
Expand Down
Loading