Files
agent-framework/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ResetVariableTemplate.tt
T
2026-02-10 21:15:59 +00:00

17 lines
862 B
Plaintext

<#@ template language="C#" inherits="ActionTemplate" visibility="internal" linePragmas="false" #>
<#@ output extension=".cs" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="Microsoft.Agents.ObjectModel" #>
<#@ include file="Snippets/AssignVariableTemplate.tt" once="true" #>
/// <summary>
/// Resets the value of the "<#= this.Model.Variable #>" variable, potentially causing re-evaluation
/// of the default value, question or action that provides the value to this variable.
/// </summary>
internal sealed class <#= this.Name #>Executor(FormulaSession session) : ActionExecutor(id: "<#= this.Id #>", session)
{
protected override async ValueTask<object?> ExecuteAsync(IWorkflowContext context, CancellationToken cancellationToken)
{<#
AssignVariable(this.Variable, "UnassignedValue.Instance"); #>
return default;
}
}