Table of Contents

Class ServiceInterface<T>

Namespace
Nerdbank.JsonRpc.BrokeredServices
Assembly
Nerdbank.JsonRpc.dll

Captures an optional or callback contract without erasing its interface type.

public sealed class ServiceInterface<T> : ServiceInterface where T : class

Type Parameters

T

The captured contract.

Inheritance
ServiceInterface<T>
Inherited Members

Methods

AddRpcTarget(JsonRpc, T, JsonRpcTargetOptions)

Registers the typed contract implementation.

public void AddRpcTarget(JsonRpc rpc, T target, JsonRpcTargetOptions options)

Parameters

rpc JsonRpc

The connection.

target T

The contract implementation.

options JsonRpcTargetOptions

Target registration options.

AddRpcTargetCore(JsonRpc, object, JsonRpcTargetOptions)

Registers the captured contract after its type has been erased.

protected override void AddRpcTargetCore(JsonRpc rpc, object target, JsonRpcTargetOptions options)

Parameters

rpc JsonRpc

The connection.

target object

The implementation.

options JsonRpcTargetOptions

Target registration options.

CreateLocalProxy(ServiceProxyContext)

Constructs a typed direct proxy for this captured contract.

public T CreateLocalProxy(ServiceProxyContext context)

Parameters

context ServiceProxyContext

The target and callback lifetime.

Returns

T

The generated proxy.

CreateLocalProxyCore(ServiceProxyContext)

Constructs a direct proxy after the captured contract type has been erased.

protected override object CreateLocalProxyCore(ServiceProxyContext context)

Parameters

context ServiceProxyContext

The target and callback lifetime.

Returns

object

The generated proxy.

CreateProxy(JsonRpc, JsonRpcProxyOptions?)

Constructs a typed proxy for this captured contract.

public T CreateProxy(JsonRpc rpc, JsonRpcProxyOptions? options = null)

Parameters

rpc JsonRpc

The unstarted connection.

options JsonRpcProxyOptions

Proxy naming and argument conventions.

Returns

T

The generated proxy. The connection remains caller-owned.

CreateProxyCore(JsonRpc, JsonRpcProxyOptions?)

Constructs a proxy after the captured contract type has been erased.

protected override object CreateProxyCore(JsonRpc rpc, JsonRpcProxyOptions? options)

Parameters

rpc JsonRpc

The unstarted connection.

options JsonRpcProxyOptions

Proxy naming and argument conventions.

Returns

object

The generated proxy.