Interface IClientProxy
- Namespace
- Nerdbank.JsonRpc
- Assembly
- Nerdbank.JsonRpc.dll
Exposes a client proxy's connection and enabled contract interfaces.
public interface IClientProxy
- Extension Methods
Remarks
Generated root and RPC-marshalable proxies implement this interface. Use it instead of a CLR type test when a proxy may implement interfaces that are not enabled on the remote object. Capability queries are local and do not contact the remote endpoint or prevent direct method calls.
Properties
JsonRpc
Gets the original RPC connection, or null for a local direct proxy.
JsonRpc? JsonRpc { get; }
Property Value
Remarks
Batch and RPC-marshalable proxies return their owning connection. Accessing this property does not transfer ownership; observe the proxy's configured lifetime.
Methods
Is(Type)
Gets a value indicating whether a contract interface is enabled on this proxy.
bool Is(Type type)
Parameters
typeTypeThe contract interface type to query.
Returns
Remarks
The primary contract and its inherited interfaces are always enabled on generated proxies. Enabling an additional interface also enables its inherited interfaces. Non-interface types return false.
Exceptions
- ArgumentNullException
Thrown when
typeis null.