Table of Contents

Class RpcArgumentDeserializationException

Namespace
StreamJsonRpc
Assembly
StreamJsonRpc.dll

An exception thrown from TryGetArgumentByNameOrIndex(string?, int, Type?, out object?) when the argument cannot be deserialized to the requested type, typically due to an incompatibility or exception thrown from the deserializer.

[Serializable]
public class RpcArgumentDeserializationException : RemoteRpcException, ISerializable
Inheritance
RpcArgumentDeserializationException
Implements
Inherited Members

Constructors

RpcArgumentDeserializationException(SerializationInfo, StreamingContext)

Initializes a new instance of the RpcArgumentDeserializationException class.

protected RpcArgumentDeserializationException(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

Serialization info.

context StreamingContext

Serialization context.

RpcArgumentDeserializationException(string)

Initializes a new instance of the RpcArgumentDeserializationException class.

public RpcArgumentDeserializationException(string message)

Parameters

message string

The error message that explains the reason for the exception.

RpcArgumentDeserializationException(string, Exception?)

Initializes a new instance of the RpcArgumentDeserializationException class.

public RpcArgumentDeserializationException(string message, Exception? innerException)

Parameters

message string

The error message that explains the reason for the exception.

innerException Exception

The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.

RpcArgumentDeserializationException(string?, int?, Type?, Exception?)

Initializes a new instance of the RpcArgumentDeserializationException class.

public RpcArgumentDeserializationException(string? argumentName, int? argumentPosition, Type? deserializedType, Exception? innerException)

Parameters

argumentName string

The name of the argument from the JSON-RPC request that failed to deserialize, if available.

argumentPosition int?

The 0-based index of the argument from the JSON-RPC request that failed to deserialize, if available.

deserializedType Type

The Type to which deserialization of the argument was attempted.

innerException Exception

The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.

Properties

ArgumentName

Gets the name of the argument from the JSON-RPC request that failed to deserialize, if available.

public string? ArgumentName { get; }

Property Value

string

Remarks

This value will be null when the JSON-RPC request uses positional arguments.

ArgumentPosition

Gets the 0-based index of the argument from the JSON-RPC request that failed to deserialize, if available.

public int? ArgumentPosition { get; }

Property Value

int?

Remarks

This value will be null when the JSON-RPC request uses named arguments.

DeserializedType

Gets the Type to which deserialization of the argument was attempted.

public Type? DeserializedType { get; }

Property Value

Type

Methods

GetObjectData(SerializationInfo, StreamingContext)

public override void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo
context StreamingContext