autogen/dotnet/src/AutoGen.DotnetInteractive/DotnetInteractiveKernelBuilder.cs
amoghmc 71b7429a42
Add missing C# and F# kernels (#6283)
Add missing C# and F# kernels.
These are needed to create a default kernel else it will return an empty
kernel.
2025-04-15 20:15:28 +00:00

28 lines
863 B
C#

// Copyright (c) Microsoft Corporation. All rights reserved.
// DotnetInteractiveKernelBuilder.cs
namespace AutoGen.DotnetInteractive;
public static class DotnetInteractiveKernelBuilder
{
#if NET8_0_OR_GREATER
public static InProccessDotnetInteractiveKernelBuilder CreateEmptyInProcessKernelBuilder()
{
return new InProccessDotnetInteractiveKernelBuilder();
}
public static InProccessDotnetInteractiveKernelBuilder CreateDefaultInProcessKernelBuilder()
{
return new InProccessDotnetInteractiveKernelBuilder()
.AddCSharpKernel()
.AddFSharpKernel();
}
#endif
public static DotnetInteractiveStdioKernelConnector CreateKernelBuilder(string workingDirectory, string kernelName = "root-proxy")
{
return new DotnetInteractiveStdioKernelConnector(workingDirectory, kernelName);
}
}