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
infoSerializationInfoSerialization info.
contextStreamingContextSerialization context.
RpcArgumentDeserializationException(string)
Initializes a new instance of the RpcArgumentDeserializationException class.
public RpcArgumentDeserializationException(string message)
Parameters
messagestringThe 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
messagestringThe error message that explains the reason for the exception.
innerExceptionExceptionThe 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
argumentNamestringThe name of the argument from the JSON-RPC request that failed to deserialize, if available.
argumentPositionint?The 0-based index of the argument from the JSON-RPC request that failed to deserialize, if available.
deserializedTypeTypeThe Type to which deserialization of the argument was attempted.
innerExceptionExceptionThe 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
infoSerializationInfocontextStreamingContext