Table of Contents

Class Proxy

Namespace
MarymoorStudios.Core.Rpc
Assembly
MarymoorStudios.Core.Rpc.dll

Static helpers for mapping between TProxy and TServer.

public static class Proxy
Inheritance
Proxy
Inherited Members

Methods

Unwrap<TProxy, TServer>(Promise<TProxy>)

Unwraps a promise of a proxy to just a proxy (that can be used to pipeline immediately).

public static TProxy Unwrap<TProxy, TServer>(this Promise<TProxy> p) where TProxy : Proxy<TServer>, IProxy<TProxy, TServer> where TServer : AServer<TServer>

Parameters

p Promise<TProxy>

Returns

TProxy

Type Parameters

TProxy
TServer

When<TProxy, TServer>(Promise, Func<TProxy>)

Executes a continuation when the target resolves (with failure-coalescing).

public static TProxy When<TProxy, TServer>(this Promise target, Func<TProxy> body) where TProxy : Proxy<TServer>, IProxy<TProxy, TServer> where TServer : AServer<TServer>

Parameters

target Promise

The trigger for execution.

body Func<TProxy>

The continuation to execute if the trigger succeeded.

Returns

TProxy

Resolves to the outcome (either the trigger's failure, or the continuation's outcome).

Type Parameters

TProxy
TServer