Class DeserializationException
- Namespace
- Sportradar.OddsFeed.SDK.Common.Exceptions
- Assembly
- Sportradar.OddsFeed.SDK.dll
An exception thrown by the SDK when a deserialization of the xml received from the feed fails
[Serializable]
public class DeserializationException : FeedSdkException, ISerializable
- Inheritance
-
DeserializationException
- Implements
- Inherited Members
Constructors
DeserializationException()
Initializes a new instance of the DeserializationException class.
public DeserializationException()
DeserializationException(SerializationInfo, StreamingContext)
Initializes a new instance of the DeserializationException class.
public DeserializationException(SerializationInfo info, StreamingContext context)
Parameters
infoSerializationInfoThe SerializationInfo that holds the serialized object data about the exception being thrown.
contextStreamingContextThe StreamingContext that contains contextual information about the source or destination.
DeserializationException(string, Exception)
Initializes a new instance of the DeserializationException class.
public DeserializationException(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 if no inner exception is specified.
DeserializationException(string, string, string, Exception)
Initializes a new instance of the DeserializationException class.
public DeserializationException(string message, string xml, string rootElementName, Exception innerException)
Parameters
messagestringThe error message that explains the reason for the exception.
xmlstringThe data which could not be deserialized
rootElementNamestringThe name of the root XML element associated with the exception or a null reference if element name could not be determined
innerExceptionExceptionThe exception that is the cause of the current exception, or a null reference if no inner exception is specified.
Properties
RootElementName
Gets the name of the root XMl element associated with the exception or a null reference if element name could not be determined
public string RootElementName { get; }
Property Value
- string
The name of the root element.
Xml
Gets the data which could not be deserialized
public string Xml { get; }
Property Value
- string
The XML.
Methods
GetObjectData(SerializationInfo, StreamingContext)
When overridden in a derived class, sets the SerializationInfo with information about the exception.
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
infoSerializationInfoThe SerializationInfo that holds the serialized object data about the exception being thrown.
contextStreamingContextThe StreamingContext that contains contextual information about the source or destination.
ToString()
Returns a string that represents this instance.
public override string ToString()