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
SerializationInfoSerialization info.
context
StreamingContextSerialization context.
RpcArgumentDeserializationException(string)
Initializes a new instance of the RpcArgumentDeserializationException class.
public RpcArgumentDeserializationException(string message)
Parameters
message
stringThe 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
stringThe error message that explains the reason for the exception.
innerException
ExceptionThe 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
stringThe 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
TypeThe Type to which deserialization of the argument was attempted.
innerException
ExceptionThe 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
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
Methods
GetObjectData(SerializationInfo, StreamingContext)
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfocontext
StreamingContext