Files
agent-framework/dotnet/tests/Microsoft.Agents.Workflows.UnitTests/ForwardMessageExecutor.cs
T
Jacob Alber e1147273da .NET: fix: FanIn Edge does not work (#541)
* fix: FanIn Edge does not work

We were not creating the state for FanIn edge in EdgeMap correctly, leading to crashes. After fixing that, it turns out the logic in FanInEdgeRunner was only forwarding the last message, not all of them.

* fix: Remove duplicate code and fix typo
2025-08-28 22:25:57 +00:00

12 lines
410 B
C#

// Copyright (c) Microsoft. All rights reserved.
namespace Microsoft.Agents.Workflows.UnitTests;
internal sealed class ForwardMessageExecutor<TMessage>(string? id = null) : Executor(id) where TMessage : notnull
{
protected override RouteBuilder ConfigureRoutes(RouteBuilder routeBuilder)
{
return routeBuilder.AddHandler<TMessage>((message, ctx) => ctx.SendMessageAsync(message));
}
}