Skip to content

Strongly-typed events #425

@BalassaMarton

Description

@BalassaMarton

It would be nice to have methods for external events generated the same way we get orchestrations and activities added to TaskOrchestrationContext.

Example: If I define below type and annotate it with the (proposed) DurableEventAttribute

[DurableEvent(nameof(ApprovalEvent))]
public sealed record ApprovalEvent(bool Approved, string? Approver);

The generator should generate the following extension method:

var approvalResult = await context.WaitForApprovalEvent(); // approvalResult is of type ApprovalEvent

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions