Files
Ben Thomas 647db9635a .NET: Rename workflows projects (#975)
* Renaming Microsoft.Agent.Workflows to Microsoft.Agents.AI.Workflows

* Removing local settings.

* Removing remining old files from merge.
2025-09-29 18:30:45 +00:00

22 lines
603 B
C#

// Copyright (c) Microsoft. All rights reserved.
using System.Linq.Expressions;
namespace Microsoft.Agents.AI.Workflows.UnitTests;
internal sealed class SubstitutionVisitor(ParameterExpression parameter, Expression substitution) : ExpressionVisitor
{
private ParameterExpression Parameter => parameter;
private Expression Substitution => substitution;
protected override Expression VisitParameter(ParameterExpression node)
{
if (node.Name == this.Parameter.Name)
{
return this.Substitution;
}
return base.VisitParameter(node);
}
}