Class 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 InvokeServerExtensionAsync(IReadOnlyList<SandboxValue>, 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.
public class ServerExtensionProxy : DispatchProxy
- Inheritance
-
ServerExtensionProxy
- Inherited Members
Methods
Create<TService>(InstalledKernel)
public static TService Create<TService>(InstalledKernel kernel) where TService : class
Parameters
kernelInstalledKernel
Returns
- TService
Type Parameters
TService
Invoke(MethodInfo?, object?[]?)
Whenever any method on the generated proxy type is called, this method is invoked to dispatch control.
protected override object? Invoke(MethodInfo? targetMethod, object?[]? args)
Parameters
targetMethodMethodInfoThe method the caller invoked.
argsobject[]The arguments the caller passed to the method.