Table of Contents

Interface IClientProxy

Namespace
StreamJsonRpc
Assembly
StreamJsonRpc.dll

Indicates whether an RPC marshaled object implements an interface.

public interface IClientProxy
Extension Methods

Remarks

When casting or type checking between two RpcMarshalableAttribute-annotated interfaces, it is preferable to use the Is(Type) or As<T>(IClientProxy) methods rather than a direct cast or traditional type check. This is because the interface may be implemented by a proxy object that implements more interfaces than the marshaled object actually implements. Using these methods informs the caller as to the actual interfaces that are supported by the remote object.

This interface is implemented by RPC proxies returned from Attach<T>(IJsonRpcMessageHandler, JsonRpcProxyOptions?) and its overloads or as RPC marshalable objects. If proxies are generated for these interfaces by any other system, that proxy should also implement this interface to participate in similar dynamic type checking.

Methods

Is(Type)

Gets a value indicating whether a given interface was requested for this proxy explicitly (as opposed to being included as an artifact of its implementation).

bool Is(Type type)

Parameters

type Type

A contract interface type.

Returns

bool

true if the proxy was created with the specified type expressly listed as needing to be implemented in the proxy; otherwise false.