Skip to content

Method ExecuteAsync

Namespace: Belay.Core
Assembly: Belay.Core.dll

ExecuteAsync(string, CancellationToken)

Executes Python code on the device using basic Raw REPL protocol.

csharp
public Task<string> ExecuteAsync(string code, CancellationToken cancellationToken = default)

Parameters

code string

The Python code to execute.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<string>

The execution result.

ExecuteAsync<T>(string, CancellationToken)

Executes code and returns typed result (simplified generic version).

csharp
public Task<T> ExecuteAsync<T>(string code, CancellationToken cancellationToken = default)

Parameters

code string

cancellationToken CancellationToken

Returns

Task<T>

Type Parameters

T

Released under the Apache License 2.0.