Skip to content

Namespace DotBoxD.Plugins.Runtime.Rpc

KernelRpcMarshaller

Marshals between plain C# values and the sandbox DotBoxD.Kernels.Sandbox.SandboxValue world for server extension service calls: caller arguments are converted to sandbox values for DotBoxD.Plugins.Kernel.InstalledKernel.InvokeServerExtensionAsync(System.Collections.Generic.IReadOnlyList{DotBoxD.Kernels.Sandbox.SandboxValue},System.Threading.CancellationToken), and the returned value is converted back to the declared C# result type. Supports the supported scalars, List<T>/IEnumerable<T>, and DTOs (records/structs/classes) mapped to positional records by their fields’ declaration order — the same order the analyzer used when it lowered the kernel, so fields line up by position.

ServerExtensionProxy

A runtime proxy that implements a server-extension interface by marshaling each call through an installed batch kernel. Arguments are converted to sandbox values, the verified IR runs request/ response via DotBoxD.Plugins.Kernel.InstalledKernel.InvokeServerExtensionAsync(System.Collections.Generic.IReadOnlyList{DotBoxD.Kernels.Sandbox.SandboxValue},System.Threading.CancellationToken), and the result is marshaled back to the method’s return type, so server.ServerExtension<IMonsterKiller>().KillMonsters(ids) returns real C# objects. The service is expected to declare a single batch method; synchronous, Task<T>, and ValueTask<T> return shapes are supported.