// ------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version: 17.0.0.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// ------------------------------------------------------------------------------
namespace Microsoft.Agents.AI.Workflows.Declarative.CodeGen
{
using Microsoft.Agents.AI.Workflows.Declarative.Extensions;
using Microsoft.Agents.AI.Workflows.Declarative.ObjectModel;
using Microsoft.Bot.ObjectModel;
using Microsoft.Extensions.AI;
using System.Collections.Generic;
using System;
///
/// Class to produce the template output
///
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\RetrieveConversationMessageTemplate.tt"
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
internal partial class RetrieveConversationMessageTemplate : ActionTemplate
{
#line hidden
///
/// Create the template output
///
public override string TransformText()
{
this.Write("\n");
this.Write("\n");
this.Write("\n");
this.Write("\n");
this.Write("\n");
this.Write("\n");
this.Write("\n");
this.Write("\n");
this.Write("\n");
this.Write("\n");
this.Write("\n");
this.Write("\n");
this.Write("\n");
this.Write("\n");
this.Write("\n");
this.Write("\n");
this.Write("\n");
this.Write("\n/// \n/// Retrieves a list of messages from an agent conversation.\n/// <" +
"/summary>\ninternal sealed class ");
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\RetrieveConversationMessageTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.Name));
#line default
#line hidden
this.Write("Executor(FormulaSession session, WorkflowAgentProvider agentProvider) : ActionExe" +
"cutor(id: \"");
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\RetrieveConversationMessageTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.Id));
#line default
#line hidden
this.Write("\", session)\n{\n // \n protected override async ValueTask ExecuteAsync(IWorkflowContext context, CancellationToken cancellationToken)\n " +
" {");
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\RetrieveConversationMessageTemplate.tt"
EvaluateStringExpression(this.Model.ConversationId, "conversationId");
EvaluateStringExpression(this.Model.MessageId, "messageId");
#line default
#line hidden
this.Write("\n ChatMessage message = await agentProvider.GetMessageAsync(conversationId" +
", messageId, cancellationToken).ConfigureAwait(false);");
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\RetrieveConversationMessageTemplate.tt"
AssignVariable(this.Model.Message, "message");
#line default
#line hidden
this.Write("\n return default;\n }\n}");
return this.GenerationEnvironment.ToString();
}
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\AssignVariableTemplate.tt"
void AssignVariable(PropertyPath targetVariable, string valueVariable, bool tightFormat = false)
{
if (targetVariable is not null)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\AssignVariableTemplate.tt"
this.Write("\n await context.QueueStateUpdateAsync(key: \"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\AssignVariableTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(VariableName(targetVariable)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\AssignVariableTemplate.tt"
this.Write("\", value: ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\AssignVariableTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(valueVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\AssignVariableTemplate.tt"
this.Write(", scopeName: \"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\AssignVariableTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(VariableScope(targetVariable)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\AssignVariableTemplate.tt"
this.Write("\").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\AssignVariableTemplate.tt"
if (!tightFormat)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\AssignVariableTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\AssignVariableTemplate.tt"
}
}
}
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
void EvaluateBoolExpression(BoolExpression expression, string targetVariable, bool defaultValue = false)
{
if (expression is null)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write("\n bool ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(" = ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatBoolValue(defaultValue)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(";");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
}
else if (expression.IsLiteral)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write("\n bool ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(" = ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatBoolValue(expression.LiteralValue)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(";");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
}
else if (expression.IsVariableReference && expression.VariableReference.SegmentCount == 2)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write("\n bool ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(" = await context.ReadStateAsync(key: \"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(expression.VariableReference.VariableName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write("\", scopeName: \"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(expression.VariableReference.NamespaceAlias));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write("\").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
}
else if (expression.IsVariableReference)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write("\n bool ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(" = await context.EvaluateValueAsync>(");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatStringValue(expression.VariableReference.ToString())));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
}
else
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write("\n bool ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(" = await context.EvaluateValueAsync(");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatStringValue(expression.ExpressionText)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
this.Write(").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateBoolExpressionTemplate.tt"
}
}
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
void EvaluateEnumExpression(
EnumExpression expression,
string targetVariable,
IDictionary resultMap,
string defaultValue = null,
bool qualifyResult = false,
bool isNullable = false)
where TWrapper : EnumWrapper
{
string resultType = $"{GetTypeAlias()}{(isNullable ? "?" : "")}";
if (expression is null)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultType));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(" = ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatValue(defaultValue)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(";");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
}
else if (expression.IsLiteral)
{
resultMap.TryGetValue(expression.LiteralValue, out string resultValue);
if (qualifyResult)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultType));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(" = ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(GetTypeAlias()));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(".");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultValue));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(";");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
}
else
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultType));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(" = ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatValue(resultValue)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(";");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
}
}
else if (expression.IsVariableReference && expression.VariableReference.SegmentCount == 2)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultType));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(" = await context.ReadStateAsync<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultType));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(">(key: \"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(expression.VariableReference.VariableName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write("\", scopeName: \"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(expression.VariableReference.NamespaceAlias));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write("\").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
}
else if (expression.IsVariableReference)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultType));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write("? ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(" = await context.EvaluateValueAsync<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultType));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(">(");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatStringValue(expression.VariableReference.ToString())));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
}
else
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultType));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(" = await context.EvaluateValueAsync<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultType));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(">(");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatStringValue(expression.ExpressionText)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
this.Write(").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateEnumExpressionTemplate.tt"
}
}
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
void EvaluateIntExpression(IntExpression expression, string targetVariable, bool isNullable = false)
{
string typeName = isNullable ? "int?" : "int";
if (expression is null)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(" = ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(isNullable ? "null" : "0"));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(";");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
}
else if (expression.IsLiteral)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(" = ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(expression.LiteralValue));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(";");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
}
else if (expression.IsVariableReference && expression.VariableReference.SegmentCount == 2)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(" = await context.ReadStateAsync(key: \"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(expression.VariableReference.VariableName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write("\", scopeName: \"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(expression.VariableReference.NamespaceAlias));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write("\").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
}
else if (expression.IsVariableReference)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write("? ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(" = await context.EvaluateValueAsync<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(">(");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatStringValue(expression.VariableReference.ToString())));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
}
else
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(" = await context.EvaluateValueAsync<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(">(");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatStringValue(expression.ExpressionText)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
this.Write(").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateIntExpressionTemplate.tt"
}
}
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
void EvaluateListExpression(ValueExpression expression, string targetVariable)
{
string typeName = GetTypeAlias();
if (expression is null)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write("\n IList<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(">? ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(" = null;");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
}
else if (expression.IsLiteral)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write("\n IList<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(">? ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(" = ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatDataValue(expression.LiteralValue)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(";");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
}
else if (expression.IsVariableReference && expression.VariableReference.SegmentCount == 2)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write("\n IList<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(">? ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(" = await context.ReadListAsync<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(GetTypeAlias()));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(">(key: \"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(expression.VariableReference.VariableName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write("\", scopeName: \"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(expression.VariableReference.NamespaceAlias));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write("\").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
}
else if (expression.IsVariableReference)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write("\n IList<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(">? ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write("> = await context.EvaluateListAsync<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(">(");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatStringValue(expression.VariableReference.ToString())));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
}
else
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write("\n IList<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(">? ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(" = await context.EvaluateListAsync<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(">(");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatStringValue(expression.ExpressionText)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
this.Write(").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateListExpressionTemplate.tt"
}
}
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
void EvaluateRecordExpression(ObjectExpression expression, string targetVariable)
{
string resultTypeName = $"Dictionary()}?>?";
if (expression is null)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultTypeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(" = null;");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
}
else if (expression.IsLiteral)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultTypeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(" =\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatDataValue(expression.LiteralValue)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(";");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
}
else if (expression.IsVariableReference && expression.VariableReference.SegmentCount == 2)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultTypeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(" = await context.ReadStateAsync<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultTypeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(">(key: \"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(expression.VariableReference.VariableName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write("\", scopeName: \"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(expression.VariableReference.NamespaceAlias));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write("\").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
}
else if (expression.IsVariableReference)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultTypeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write("? ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(" = await context.EvaluateExpressionAsync<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultTypeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(">(");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatStringValue(expression.VariableReference.ToString())));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
}
else
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultTypeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(" = await context.EvaluateExpressionAsync<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resultTypeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(">(");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatStringValue(expression.ExpressionText)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
this.Write(").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateRecordExpressionTemplate.tt"
}
}
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
void EvaluateStringExpression(StringExpression expression, string targetVariable, bool isNullable = false)
{
string typeName = isNullable ? "string?" : "string";
if (expression is null)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(" = ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(isNullable ? "null" : "string.Empty"));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(";");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
}
else if (expression.IsLiteral)
{
if (expression.LiteralValue.Contains("\n"))
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(" = \n \"\"\"\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(expression.LiteralValue));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write("\n \"\"\";");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
}
else
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(" = ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatStringValue(expression.LiteralValue)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(";");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
}
}
else if (expression.IsVariableReference && expression.VariableReference.SegmentCount == 2)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(" = await context.ReadStateAsync(key: \"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(expression.VariableReference.VariableName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write("\", scopeName: \"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(expression.VariableReference.NamespaceAlias));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write("\").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
}
else if (expression.IsVariableReference)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(" = await context.EvaluateValueAsync(");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatStringValue(expression.VariableReference.ToString())));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
}
else
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(typeName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(" ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(" = await context.EvaluateValueAsync(");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatStringValue(expression.ExpressionText)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
this.Write(").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateStringExpressionTemplate.tt"
}
}
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
void EvaluateValueExpression(ValueExpression expression, string targetVariable) =>
EvaluateValueExpression(expression, targetVariable);
void EvaluateValueExpression(ValueExpression expression, string targetVariable)
{
if (expression is null)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(GetTypeAlias()));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write("? ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(" = null;");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
}
else if (expression.IsLiteral)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(GetTypeAlias()));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write("? ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(" = ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatDataValue(expression.LiteralValue)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(";");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
}
else if (expression.IsVariableReference && expression.VariableReference.SegmentCount == 2)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(GetTypeAlias()));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write("? ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(" = await context.ReadStateAsync<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(GetTypeAlias()));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(">(key: \"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(expression.VariableReference.VariableName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write("\", scopeName: \"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(expression.VariableReference.NamespaceAlias));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write("\").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
}
else if (expression.IsVariableReference)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(GetTypeAlias()));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write("? ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(" = await context.EvaluateValueAsync<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(GetTypeAlias()));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(">(");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatStringValue(expression.VariableReference.ToString())));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
}
else
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(GetTypeAlias()));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write("? ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetVariable));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(" = await context.EvaluateValueAsync<");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(GetTypeAlias()));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(">(");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(FormatStringValue(expression.ExpressionText)));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
this.Write(").ConfigureAwait(false);");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\EvaluateValueExpressionTemplate.tt"
}
}
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\FormatMessageTemplate.tt"
void EvaluateMessageTemplate(TemplateLine templateLine, string variableName)
{
if (templateLine is not null)
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\FormatMessageTemplate.tt"
this.Write("\n string ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\FormatMessageTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(variableName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\FormatMessageTemplate.tt"
this.Write(" =\n await context.FormatTemplateAsync(\n \"\"\"");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\FormatMessageTemplate.tt"
FormatMessageTemplate(templateLine);
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\FormatMessageTemplate.tt"
this.Write("\n \"\"\");");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\FormatMessageTemplate.tt"
}
else
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\FormatMessageTemplate.tt"
this.Write("\n string? ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\FormatMessageTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(variableName));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\FormatMessageTemplate.tt"
this.Write(" = null;");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\FormatMessageTemplate.tt"
}
}
void FormatMessageTemplate(TemplateLine line)
{
foreach (string text in line.ToTemplateString().ByLine())
{
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\FormatMessageTemplate.tt"
this.Write("\n ");
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\FormatMessageTemplate.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(text));
#line default
#line hidden
#line 1 "C:\Users\crickman\source\repos\af5\dotnet\src\Microsoft.Agents.AI.Workflows.Declarative\CodeGen\Snippets\FormatMessageTemplate.tt"
}
}
#line default
#line hidden
}
#line default
#line hidden
}