Method WithResult
WithResult<T>(T)
Creates a new JSON-RPC response with the given result object and the
Null ID.
Declaration
public static JsonRpcResponse<T> WithResult<T>(T result)
Parameters
Type |
Name |
Description |
T |
result |
The result object of the response. |
Returns
Type |
Description |
JsonRpcResponse<T> |
A new JSON-RPC response that contains the provided result object. |
Type Parameters
Name |
Description |
T |
The type of the result parameter. |
WithResult<T>(T, JsonRpcId)
Creates a new JSON-RPC response with the given result object.
Declaration
public static JsonRpcResponse<T> WithResult<T>(T result, JsonRpcId id)
Parameters
Type |
Name |
Description |
T |
result |
The result object of the response. |
JsonRpcId |
id |
The JSON-RPC ID of the request that succeeded. |
Returns
Type |
Description |
JsonRpcResponse<T> |
A new JSON-RPC response that contains the provided result object. |
Type Parameters
Name |
Description |
T |
The type of the result parameter. |