mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Merge branch 'main' into crickman/dotnet-sample-improvements
This commit is contained in:
@@ -35,7 +35,7 @@ public static class Program
|
||||
|
||||
// Execute the workflow and save checkpoints
|
||||
await using StreamingRun checkpointedRun = await InProcessExecution
|
||||
.StreamAsync(workflow, new SignalWithNumber(NumberSignal.Init), checkpointManager)
|
||||
.RunStreamingAsync(workflow, new SignalWithNumber(NumberSignal.Init), checkpointManager)
|
||||
;
|
||||
await foreach (WorkflowEvent evt in checkpointedRun.WatchStreamAsync())
|
||||
{
|
||||
@@ -98,8 +98,7 @@ public static class Program
|
||||
|
||||
private static ExternalResponse HandleExternalRequest(ExternalRequest request)
|
||||
{
|
||||
var signal = request.DataAs<SignalWithNumber>();
|
||||
if (signal is not null)
|
||||
if (request.TryGetDataAs<SignalWithNumber>(out var signal))
|
||||
{
|
||||
switch (signal.Signal)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user