2024-10-02 11:42:27 -07:00
|
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
2024-08-08 10:49:58 -07:00
|
|
|
// DotnetInteractiveKernelBuilder.cs
|
|
|
|
|
|
|
|
namespace AutoGen.DotnetInteractive;
|
|
|
|
|
2024-08-09 18:53:48 -07:00
|
|
|
public static class DotnetInteractiveKernelBuilder
|
2024-08-08 10:49:58 -07:00
|
|
|
{
|
|
|
|
|
2024-08-09 18:53:48 -07:00
|
|
|
#if NET8_0_OR_GREATER
|
|
|
|
public static InProccessDotnetInteractiveKernelBuilder CreateEmptyInProcessKernelBuilder()
|
2024-08-08 10:49:58 -07:00
|
|
|
{
|
2024-08-09 18:53:48 -07:00
|
|
|
return new InProccessDotnetInteractiveKernelBuilder();
|
2024-08-08 10:49:58 -07:00
|
|
|
}
|
|
|
|
|
2024-08-09 18:53:48 -07:00
|
|
|
public static InProccessDotnetInteractiveKernelBuilder CreateDefaultInProcessKernelBuilder()
|
2024-08-08 10:49:58 -07:00
|
|
|
{
|
2025-04-16 01:45:28 +05:30
|
|
|
return new InProccessDotnetInteractiveKernelBuilder()
|
|
|
|
.AddCSharpKernel()
|
|
|
|
.AddFSharpKernel();
|
2024-08-08 10:49:58 -07:00
|
|
|
}
|
2024-08-09 18:53:48 -07:00
|
|
|
#endif
|
2024-08-08 10:49:58 -07:00
|
|
|
|
2024-08-09 18:53:48 -07:00
|
|
|
public static DotnetInteractiveStdioKernelConnector CreateKernelBuilder(string workingDirectory, string kernelName = "root-proxy")
|
2024-08-08 10:49:58 -07:00
|
|
|
{
|
2024-08-09 18:53:48 -07:00
|
|
|
return new DotnetInteractiveStdioKernelConnector(workingDirectory, kernelName);
|
2024-08-08 10:49:58 -07:00
|
|
|
}
|
|
|
|
}
|