Show / Hide Table of Contents

    Method WithError

    WithError(Int32, String)

    Creates a new JSON-RPC error response instance with a Null ID.
    Declaration
    public static JsonRpcResponse WithError(int code, string message)
    Parameters
    Type Name Description
    Int32 code The JSON-RPC error code.
    String message A short description String of the error.
    Returns
    Type Description
    JsonRpcResponse A new JSON-RPC response that contains the provided error details.

    WithError(Int32, String, JsonRpcId)

    Creates a new JSON-RPC response instance that indicates an error.
    Declaration
    public static JsonRpcResponse WithError(int code, string message, JsonRpcId id)
    Parameters
    Type Name Description
    Int32 code The JSON-RPC error code.
    String message A short description String of the error.
    JsonRpcId id The JSON-RPC ID of the request that failed.
    Returns
    Type Description
    JsonRpcResponse A new JSON-RPC response that contains the provided error details.

    WithError(Int32, String, Object)

    Creates a new JSON-RPC error response instance with a Null ID.
    Declaration
    public static JsonRpcResponse WithError(int code, string message, object data)
    Parameters
    Type Name Description
    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 new JSON-RPC response that contains the provided error details.

    WithError(Int32, String, Object, JsonRpcId)

    Creates a new JSON-RPC response instance that indicates an error.
    Declaration
    public static JsonRpcResponse WithError(int code, string message, object data, JsonRpcId id)
    Parameters
    Type Name Description
    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.
    JsonRpcId id The JSON-RPC ID of the request that failed.
    Returns
    Type Description
    JsonRpcResponse A new JSON-RPC response that contains the provided error details.

    WithError(JsonRpcError)

    Creates a new JSON-RPC error response instance with a Null ID.
    Declaration
    public static JsonRpcResponse WithError(JsonRpcError jsonRpcError)
    Parameters
    Type Name Description
    JsonRpcError jsonRpcError The JsonRpcError instance that describes the error.
    Returns
    Type Description
    JsonRpcResponse A new JSON-RPC response that contains the provided error details.

    WithError(JsonRpcError, JsonRpcId)

    Creates a new JSON-RPC response instance that indicates an error.
    Declaration
    public static JsonRpcResponse WithError(JsonRpcError jsonRpcError, JsonRpcId id)
    Parameters
    Type Name Description
    JsonRpcError jsonRpcError The JsonRpcError instance that describes the error.
    JsonRpcId id The JSON-RPC ID of the request that failed.
    Returns
    Type Description
    JsonRpcResponse A new JSON-RPC response that contains the provided error details.

    WithError<T>(Int32, String)

    Creates a new JSON-RPC error response instance with a Null ID.
    Declaration
    public static JsonRpcResponse<T> WithError<T>(int code, string message)
    Parameters
    Type Name Description
    Int32 code The JSON-RPC error code.
    String message A short description String of the error.
    Returns
    Type Description
    JsonRpcResponse<T> A new JSON-RPC response that contains the provided error details.
    Type Parameters
    Name Description
    T The desired type of the reponse result.

    WithError<T>(Int32, String, JsonRpcId)

    Creates a new JSON-RPC response instance that indicates an error.
    Declaration
    public static JsonRpcResponse<T> WithError<T>(int code, string message, JsonRpcId id)
    Parameters
    Type Name Description
    Int32 code The JSON-RPC error code.
    String message A short description String of the error.
    JsonRpcId id The JSON-RPC ID of the request that failed.
    Returns
    Type Description
    JsonRpcResponse<T> A new JSON-RPC response that contains the provided error details.
    Type Parameters
    Name Description
    T The desired type of the reponse result.

    WithError<T>(Int32, String, Object)

    Creates a new JSON-RPC error response instance with a Null ID.
    Declaration
    public static JsonRpcResponse<T> WithError<T>(int code, string message, object data)
    Parameters
    Type Name Description
    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 new JSON-RPC response that contains the provided error details.
    Type Parameters
    Name Description
    T The desired type of the reponse result.

    WithError<T>(Int32, String, Object, JsonRpcId)

    Creates a new JSON-RPC response instance that indicates an error.
    Declaration
    public static JsonRpcResponse<T> WithError<T>(int code, string message, object data, JsonRpcId id)
    Parameters
    Type Name Description
    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.
    JsonRpcId id The JSON-RPC ID of the request that failed.
    Returns
    Type Description
    JsonRpcResponse<T> A new JSON-RPC response that contains the provided error details.
    Type Parameters
    Name Description
    T The desired type of the reponse result.

    WithError<T>(JsonRpcError)

    Creates a new JSON-RPC error response instance with a Null ID.
    Declaration
    public static JsonRpcResponse<T> WithError<T>(JsonRpcError jsonRpcError)
    Parameters
    Type Name Description
    JsonRpcError jsonRpcError The JsonRpcError instance that describes the error.
    Returns
    Type Description
    JsonRpcResponse<T> A new JSON-RPC response that contains the provided error details.
    Type Parameters
    Name Description
    T The desired type of the reponse result.

    WithError<T>(JsonRpcError, JsonRpcId)

    Creates a new JSON-RPC response instance that indicates an error.
    Declaration
    public static JsonRpcResponse<T> WithError<T>(JsonRpcError jsonRpcError, JsonRpcId id)
    Parameters
    Type Name Description
    JsonRpcError jsonRpcError The JsonRpcError instance that describes the error.
    JsonRpcId id The JSON-RPC ID of the request that failed.
    Returns
    Type Description
    JsonRpcResponse<T> A new JSON-RPC response 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.