Table of Contents

Interface IComposedProgram

Namespace
RDCore.SDK.Runtime.Hosting
Assembly
RDCore.SDK.dll

An RD-VBA program composed once from its files (parsed, its symbols defined and bound), which makes the machines that run it.

public interface IComposedProgram : IAsyncDisposable
Inherited Members

Remarks

A host composes the program at startup, reads what it serves from Documents (an RDWeb host reads its endpoints from the annotations), and makes as many machines as it runs invocations at once. Disposing the program disposes no machine: each machine is disposed by its owner, before the program.

Properties

Documents

The program's files, each with its parse: the modules of the program, a file of several modules with one for each of its blocks (ModuleUris).

IReadOnlyList<RDCoreDocument> Documents { get; }

Property Value

IReadOnlyList<RDCoreDocument>

Methods

CreateMachineAsync(CancellationToken)

Makes a machine of the program, in a state of its own: no module-level variable set, no object made, no file open.

ValueTask<IProgramMachine> CreateMachineAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancels making the machine.

Returns

ValueTask<IProgramMachine>

The machine; its owner disposes it.

Exceptions

OperationCanceledException

The token was cancelled before the machine was made.

ObjectDisposedException

The program was disposed.

JsonSchemasAsync(string, CancellationToken)

The JSON Schemas of the program's procedures, as the binding of its modules has their parameters and their types: what an invocation gives each parameter, and what it receives. An RDWeb host describes its endpoints with them.

ValueTask<ProgramJsonSchemas?> JsonSchemasAsync(string referencePrefix, CancellationToken cancellationToken)

Parameters

referencePrefix string

What a reference to a definition is, before its name (JsonSchemaSet).

cancellationToken CancellationToken

Cancels reading the program's symbols.

Returns

ValueTask<ProgramJsonSchemas>

The schemas; null from a program that does not state them, which is what this member returns unless a program implements it.

Exceptions

OperationCanceledException

The token was cancelled.

ObjectDisposedException

The program was disposed.