Class InteractiveService
- Namespace
- AutoGen.DotnetInteractive
- Assembly
- AutoGen.DotnetInteractive.dll
public class InteractiveService : IDisposable
- Inheritance
-
InteractiveService
- Implements
- Inherited Members
Constructors
InteractiveService(Kernel)
Create an instance of InteractiveService with a running kernel. When using this constructor, you don't need to call StartAsync(string, CancellationToken) to start the kernel.
public InteractiveService(Kernel kernel)
Parameters
kernel
Kernel
InteractiveService(string)
Install dotnet interactive tool to installingDirectory
and create an instance of InteractiveService.
When using this constructor, you need to call StartAsync(string, CancellationToken) to install dotnet interactive tool and start the kernel.
public InteractiveService(string installingDirectory)
Parameters
installingDirectory
stringdotnet interactive installing directory
Properties
Kernel
public Kernel? Kernel { get; }
Property Value
- Kernel
Methods
Dispose()
public void Dispose()
Dispose(bool)
protected virtual void Dispose(bool disposing)
Parameters
disposing
bool
IsRunning()
public bool IsRunning()
Returns
RestoreDotnetInteractive()
public bool RestoreDotnetInteractive()
Returns
StartAsync(string, CancellationToken)
public Task<bool> StartAsync(string workingDirectory, CancellationToken ct = default)
Parameters
workingDirectory
stringct
CancellationToken
Returns
SubmitCSharpCodeAsync(string, CancellationToken)
public Task<string?> SubmitCSharpCodeAsync(string code, CancellationToken ct)
Parameters
code
stringct
CancellationToken
Returns
SubmitCommandAsync(SubmitCode, CancellationToken)
public Task<string?> SubmitCommandAsync(SubmitCode cmd, CancellationToken ct)
Parameters
cmd
SubmitCodect
CancellationToken
Returns
SubmitPowershellCodeAsync(string, CancellationToken)
public Task<string?> SubmitPowershellCodeAsync(string code, CancellationToken ct)
Parameters
code
stringct
CancellationToken