react_agent.custom_tools.dotnet_validator.DotnetValidationInput Objects
source_code- The C# source code (either schema mapping or query) to compile and run.framework- The specific .NET target framework (e.g., EF Core, Dapper, NHibernate).
react_agent.custom_tools.dotnet_validator.compile_and_run_dotnet
- Generates the appropriate .csproj file based on the target framework.
- Builds a comprehensive bash script (
run.sh) to compile and execute the code. - Provisions environment variables and database connection strings.
- Base64 encodes all payload files to safely transfer them over to the sandbox.
- Invokes the
execute_in_sandboxtool. - If a query output JSON was produced, it downloads it via
download_file_from_sandbox.
source_codestr - The raw C# source code to compile and run.frameworkDotnetFramework - The target .NET framework (EF Core, Dapper, etc.).runtimeToolRuntime[Context, State] - The LangGraph tool runtime containing context and state.
RuntimeError- If fetching the framework config fails or the sandbox execution throws an exception.
react_agent.custom_tools.dotnet_validator.validate_dotnet_code
compile_and_run_dotnet and then parses the returned JSON results.
Crucially, it determines whether it is currently validating the “source” query or the
“target” query based on the tool call ID or state comparison, and dynamically issues a
LangGraph Command to update the global state with the parsed QueryValidationResults.
Arguments:
source_codestr - The C# source code to validate.frameworkDotnetFramework - The target .NET framework.runtimeToolRuntime[Context, State] - Automatically injected runtime context.