JsonRpc Constructors

Definition

Overloads

JsonRpc(IJsonRpcMessageHandler)

Initializes a new instance of the JsonRpc class.

JsonRpc(Stream)

Initializes a new instance of the JsonRpc class that uses HeaderDelimitedMessageHandler around messages serialized using the JsonMessageFormatter.

JsonRpc(DelimitedMessageHandler, Object)

Initializes a new instance of the JsonRpc class.

JsonRpc(IJsonRpcMessageHandler, Object)

Initializes a new instance of the JsonRpc class.

JsonRpc(Stream, Stream, Object)

Initializes a new instance of the JsonRpc class that uses HeaderDelimitedMessageHandler around messages serialized using the JsonMessageFormatter.

JsonRpc(IJsonRpcMessageHandler)

Initializes a new instance of the JsonRpc class.

public JsonRpc (StreamJsonRpc.IJsonRpcMessageHandler messageHandler);
new StreamJsonRpc.JsonRpc : StreamJsonRpc.IJsonRpcMessageHandler -> StreamJsonRpc.JsonRpc
Public Sub New (messageHandler As IJsonRpcMessageHandler)

Parameters

messageHandler
IJsonRpcMessageHandler

The message handler to use to transmit and receive RPC messages.

Remarks

It is important to call StartListening() to begin receiving messages.

Applies to

JsonRpc(Stream)

Initializes a new instance of the JsonRpc class that uses HeaderDelimitedMessageHandler around messages serialized using the JsonMessageFormatter.

public JsonRpc (System.IO.Stream stream);
new StreamJsonRpc.JsonRpc : System.IO.Stream -> StreamJsonRpc.JsonRpc
Public Sub New (stream As Stream)

Parameters

stream
Stream

The full duplex stream used to transmit and receive messages.

Remarks

It is important to call StartListening() to begin receiving messages.

Applies to

JsonRpc(DelimitedMessageHandler, Object)

Initializes a new instance of the JsonRpc class.

public JsonRpc (StreamJsonRpc.DelimitedMessageHandler messageHandler, object target = default);
new StreamJsonRpc.JsonRpc : StreamJsonRpc.DelimitedMessageHandler * obj -> StreamJsonRpc.JsonRpc
Public Sub New (messageHandler As DelimitedMessageHandler, Optional target As Object = Nothing)

Parameters

messageHandler
DelimitedMessageHandler

The message handler to use to transmit and receive RPC messages.

target
Object

An optional target object to invoke when incoming RPC requests arrive.

Remarks

It is important to call StartListening() to begin receiving messages.

Applies to

JsonRpc(IJsonRpcMessageHandler, Object)

Initializes a new instance of the JsonRpc class.

public JsonRpc (StreamJsonRpc.IJsonRpcMessageHandler messageHandler, object target);
public JsonRpc (StreamJsonRpc.IJsonRpcMessageHandler messageHandler, object? target);
new StreamJsonRpc.JsonRpc : StreamJsonRpc.IJsonRpcMessageHandler * obj -> StreamJsonRpc.JsonRpc
Public Sub New (messageHandler As IJsonRpcMessageHandler, target As Object)

Parameters

messageHandler
IJsonRpcMessageHandler

The message handler to use to transmit and receive RPC messages.

target
Object

An optional target object to invoke when incoming RPC requests arrive.

Remarks

It is important to call StartListening() to begin receiving messages.

Applies to

JsonRpc(Stream, Stream, Object)

Initializes a new instance of the JsonRpc class that uses HeaderDelimitedMessageHandler around messages serialized using the JsonMessageFormatter.

public JsonRpc (System.IO.Stream sendingStream, System.IO.Stream receivingStream, object target = default);
public JsonRpc (System.IO.Stream? sendingStream, System.IO.Stream? receivingStream, object? target = default);
new StreamJsonRpc.JsonRpc : System.IO.Stream * System.IO.Stream * obj -> StreamJsonRpc.JsonRpc
Public Sub New (sendingStream As Stream, receivingStream As Stream, Optional target As Object = Nothing)

Parameters

sendingStream
Stream

The stream used to transmit messages. May be null.

receivingStream
Stream

The stream used to receive messages. May be null.

target
Object

An optional target object to invoke when incoming RPC requests arrive.

Remarks

It is important to call StartListening() to begin receiving messages.

Applies to