Class JsonRpcResponse
A JSON-RPC server response which may either indicate success, with an arbitrary response object, or an error
with a corresponding
JsonRpcError instance describing the error.
This default implementation allows to retrieve a response object of a specified type after the response has
been deserialised, by using the ResultAs<T>() method.
Inheritance
JsonRpcResponse
Assembly: XploRe.Net.JsonRpc.dll
Syntax
public class JsonRpcResponse : JsonRpcResponse<object>, IJsonRpcResponse<object>, IJsonRpcMessage, IHasProtocolVersion
Constructors
Properties
Name |
Description |
False
|
A JSON-RPC response object that indicates success with false as the result value and the
Null JSON-RPC ID.
|
True
|
A JSON-RPC response object that indicates success with true as the result value and the
Null JSON-RPC ID.
|
Methods
Name |
Description |
ResultAs<T>()
|
Creates an instance of the given type T from the result of the response.
|
WithError(Int32, String)
|
Creates a new JSON-RPC error response instance with a Null ID.
|
WithError(Int32, String, Object)
|
Creates a new JSON-RPC error response instance with a Null ID.
|
WithError(Int32, String, Object, JsonRpcId)
|
Creates a new JSON-RPC response instance that indicates an error.
|
WithError(Int32, String, JsonRpcId)
|
Creates a new JSON-RPC response instance that indicates an error.
|
WithError(JsonRpcError)
|
Creates a new JSON-RPC error response instance with a Null ID.
|
WithError(JsonRpcError, JsonRpcId)
|
Creates a new JSON-RPC response instance that indicates an error.
|
WithError<T>(Int32, String)
|
Creates a new JSON-RPC error response instance with a Null ID.
|
WithError<T>(Int32, String, Object)
|
Creates a new JSON-RPC error response instance with a Null ID.
|
WithError<T>(Int32, String, Object, JsonRpcId)
|
Creates a new JSON-RPC response instance that indicates an error.
|
WithError<T>(Int32, String, JsonRpcId)
|
Creates a new JSON-RPC response instance that indicates an error.
|
WithError<T>(JsonRpcError)
|
Creates a new JSON-RPC error response instance with a Null ID.
|
WithError<T>(JsonRpcError, JsonRpcId)
|
Creates a new JSON-RPC response instance that indicates an error.
|
WithResult<T>(T)
|
Creates a new JSON-RPC response with the given result object and the Null ID.
|
WithResult<T>(T, JsonRpcId)
|
Creates a new JSON-RPC response with the given result object.
|