sdk-dotnet icon indicating copy to clipboard operation
sdk-dotnet copied to clipboard

Add strongly-typed extension methods for SignalWithStart

Open Blackburn29 opened this issue 1 year ago • 2 comments

What was changed

Added extension methods for calling signalWithStart.

Why?

Adds support for strong typings when starting a workflow with a signal.

Currently this requires holding a second variable for WorkflowOptions and calling options.SignalWithStart(x => x.Method()).

These extension methods give you the ability to short-hand the setup:

var handle = await _temporalClient.SignalWorkflowWithStartAsync(
    workflow => workflow.RunAsync(),
    workflow => workflow.SignalMethod(),
    new WorkflowOptions
    {
       //...
    });

Checklist

  1. Closes N/A

  2. How was this tested: I have been using these extension methods in some of my applications for awhile, but I figured they would be useful to others.

  3. Any docs updates needed? N/A

Blackburn29 avatar Jun 07 '24 16:06 Blackburn29