Show / Hide Table of Contents

    Method CreateResponseWithError

    CreateResponseWithError(IJsonRpcRequest, Int32, String)

    Creates a new JsonRpcResponse instance with the same JSON-RPC ID as this JsonRpcRequest and the provided error details.
    Declaration
    public static JsonRpcResponse CreateResponseWithError(this IJsonRpcRequest request, int code, string message)
    Parameters
    Type Name Description
    IJsonRpcRequest request This IJsonRpcRequest instance.
    Int32 code The JSON-RPC error code.
    String message A short description String of the error.
    Returns
    Type Description
    JsonRpcResponse A JSON-RPC response with a matching ID that contains the provided error details.

    CreateResponseWithError(IJsonRpcRequest, Int32, String, Object)

    Creates a new JsonRpcResponse instance with the same JSON-RPC ID as this JsonRpcRequest and the provided error details.
    Declaration
    public static JsonRpcResponse CreateResponseWithError(this IJsonRpcRequest request, int code, string message, object data)
    Parameters
    Type Name Description
    IJsonRpcRequest request This IJsonRpcRequest instance.
    Int32 code The JSON-RPC error code.
    String message A short description String of the error.
    Object data An optional primitive or structured value with additional information about the error.
    Returns
    Type Description
    JsonRpcResponse A JSON-RPC response with a matching ID that contains the provided error details.

    CreateResponseWithError(IJsonRpcRequest, JsonRpcError)

    Creates a new JsonRpcResponse instance with the same JSON-RPC ID as this JsonRpcRequest and the provided error details.
    Declaration
    public static JsonRpcResponse CreateResponseWithError(this IJsonRpcRequest request, JsonRpcError jsonRpcError)
    Parameters
    Type Name Description
    IJsonRpcRequest request This IJsonRpcRequest instance.
    JsonRpcError jsonRpcError The JsonRpcError instance that describes the error.
    Returns
    Type Description
    JsonRpcResponse A JSON-RPC response with a matching ID that contains the provided error details.

    CreateResponseWithError<T>(IJsonRpcRequest, Int32, String)

    Creates a new JsonRpcResponse<TResult> instance with the same JSON-RPC ID as this JsonRpcRequest and the provided error details.
    Declaration
    public static JsonRpcResponse<T> CreateResponseWithError<T>(this IJsonRpcRequest request, int code, string message)
    Parameters
    Type Name Description
    IJsonRpcRequest request This IJsonRpcRequest instance.
    Int32 code The JSON-RPC error code.
    String message A short description String of the error.
    Returns
    Type Description
    JsonRpcResponse<T> A JSON-RPC response with a matching ID that contains the provided error details.
    Type Parameters
    Name Description
    T The desired type of the reponse result.

    CreateResponseWithError<T>(IJsonRpcRequest, Int32, String, Object)

    Creates a new JsonRpcResponse<TResult> instance with the same JSON-RPC ID as this JsonRpcRequest and the provided error details.
    Declaration
    public static JsonRpcResponse<T> CreateResponseWithError<T>(this IJsonRpcRequest request, int code, string message, object data)
    Parameters
    Type Name Description
    IJsonRpcRequest request This IJsonRpcRequest instance.
    Int32 code The JSON-RPC error code.
    String message A short description String of the error.
    Object data An optional primitive or structured value with additional information about the error.
    Returns
    Type Description
    JsonRpcResponse<T> A JSON-RPC response with a matching ID that contains the provided error details.
    Type Parameters
    Name Description
    T The desired type of the reponse result.

    CreateResponseWithError<T>(IJsonRpcRequest, JsonRpcError)

    Creates a new JsonRpcResponse<TResult> instance with the same JSON-RPC ID as this JsonRpcRequest and the provided error details.
    Declaration
    public static JsonRpcResponse<T> CreateResponseWithError<T>(this IJsonRpcRequest request, JsonRpcError jsonRpcError)
    Parameters
    Type Name Description
    IJsonRpcRequest request This IJsonRpcRequest instance.
    JsonRpcError jsonRpcError The JsonRpcError instance that describes the error.
    Returns
    Type Description
    JsonRpcResponse<T> A JSON-RPC response with a matching ID that contains the provided error details.
    Type Parameters
    Name Description
    T The desired type of the reponse result.
    Back to top Copyright © 2017-2018, xplo.re IT Services, Michael Maier. All rights reserved.