Table of Contents

Class SessionExecuteParams

Namespace
RDCore.SDK.Platform.Protocol
Assembly
RDCore.SDK.Protocol.dll

Request for rdcore/session/execute: a client asks the language server to run one procedure of a module it supplies.

public record SessionExecuteParams : IEquatable<SessionExecuteParams>
Inheritance
SessionExecuteParams
Implements
Derived
Inherited Members

Remarks

The source travels with the request rather than being read from the workspace, because the code a client wants to run is not always a file: an interactive shell's program lives in a buffer, and its immediate-mode line is a procedure that exists for exactly one statement's worth of time. The language server parses it, defines its symbols, and hands the result to whichever component owns the runtime session.

Cancelling the request is how a caller interrupts a running program — the shell's Ctrl+Break. The cancellation reaches the interpreter loop itself, so a program that will never finish on its own still stops.

Properties

Debug

Whether the program runs under a debugger: a Stop, a failed Debug.Assert or a break does not end the request but suspends the program, and the answer is Suspended. It is resumed, stepped or ended by the requests of rdcore/session/debug/*. Without it a Stop ends the run as Interrupted, as it always did.

public bool Debug { get; init; }

Property Value

bool

EntryPoint

The name of the parameterless procedure to invoke.

public string EntryPoint { get; init; }

Property Value

string

Immediate

Whether the entry point is a statement typed at a prompt, to be run in the session as it is. While a program waits at a stop it is run alongside the program, which waits still - this is how its variables are read and set - and without it a run while a program waits starts the program over.

public bool Immediate { get; init; }

Property Value

bool

ModuleName

The module's programmatic name, which is the scope the entry point is resolved in.

public string ModuleName { get; init; }

Property Value

string

SessionModule

Whether the module is the client's own, of the runtime session and not of the project (sessionModule on the wire): a shell's program, which the project of a workspace the shell is attached to does not list. When the session has no module of that name, the module is defined as a standard module of the session at the workspace root, as the code of an Immediate window is, and the project file is not changed. It is then a module the session has: a later run finds it with or without this flag, until the project is reloaded and the session composed again.

public bool SessionModule { get; init; }

Property Value

bool

Remarks

Without it, a module the session does not have is not found (NotFound). A module of the client's own cannot be named after the project or a library it references: they and the project's procedural modules are matched in one tier (MS-VBAL §5.6.10), so the name would match twice, and every name qualified by it would be invalid. The run is not found, and the result says why.

Source

The complete source of the module to run — every procedure of it, not just the one being invoked, since the entry point may call the others.

public string Source { get; init; }

Property Value

string