mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.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:
@@ -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
|
||||
{
|
||||
|
||||
+1
-1
@@ -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);
|
||||
+1
-1
@@ -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);
|
||||
Reference in New Issue
Block a user