.NET: Workflow getting started samples in .Net (Second batch) (#650)

* Add loop and agents in workflows samples

* Add foundry agent and workflow as agent samples

* Checkpoint sample WIP

* Checkpoint sample 1 Done

* Add HIL samples

* Fix formatting

* Force folder name change step 1

* Force folder name change step 2

* Fix formatting

* Fix formatting

* Add checkpoint and rehydrate sample

* _Foundational

* Fix formatting
This commit is contained in:
Tao Chen
2025-09-10 18:47:13 +00:00
committed by GitHub
parent 2393351a03
commit 89c8418705
42 changed files with 1815 additions and 42 deletions
@@ -67,7 +67,7 @@ public abstract class Executor : IIdentified
/// <exception cref="TargetInvocationException">An exception is generated while handling the message.</exception>
public async ValueTask<object?> ExecuteAsync(object message, Type messageType, IWorkflowContext context)
{
await context.AddEventAsync(new ExecutorInvokeEvent(this.Id, message)).ConfigureAwait(false);
await context.AddEventAsync(new ExecutorInvokedEvent(this.Id, message)).ConfigureAwait(false);
CallResult? result = await this.Router.RouteMessageAsync(message, context, requireRoute: true)
.ConfigureAwait(false);
@@ -75,7 +75,7 @@ public abstract class Executor : IIdentified
ExecutorEvent executionResult;
if (result == null || result.IsSuccess)
{
executionResult = new ExecutorCompleteEvent(this.Id, result?.Result);
executionResult = new ExecutorCompletedEvent(this.Id, result?.Result);
}
else
{
@@ -7,4 +7,4 @@ namespace Microsoft.Agents.Workflows;
/// </summary>
/// <param name="executorId">The unique identifier of the executor that has completed.</param>
/// <param name="result">The result produced by the executor upon completion, or <c>null</c> if no result is available.</param>
public sealed class ExecutorCompleteEvent(string executorId, object? result) : ExecutorEvent(executorId, data: result);
public sealed class ExecutorCompletedEvent(string executorId, object? result) : ExecutorEvent(executorId, data: result);
@@ -7,4 +7,4 @@ namespace Microsoft.Agents.Workflows;
/// </summary>
/// <param name="executorId">The unique identifier of the executor being invoked.</param>
/// <param name="message">The invocation message.</param>
public sealed class ExecutorInvokeEvent(string executorId, object message) : ExecutorEvent(executorId, data: message);
public sealed class ExecutorInvokedEvent(string executorId, object message) : ExecutorEvent(executorId, data: message);