Class MappingException
- Namespace
- Sportradar.OddsFeed.SDK.Common.Exceptions
- Assembly
- Sportradar.OddsFeed.SDK.dll
An exception thrown by the SDK when the entity received from the feed could not be mapped to entity used by the SDK
[Serializable]
public class MappingException : FeedSdkException, ISerializable
- Inheritance
-
MappingException
- Implements
- Inherited Members
Constructors
MappingException()
Initializes a new instance of the MappingException class.
public MappingException()
MappingException(SerializationInfo, StreamingContext)
Initializes a new instance of the MappingException class.
protected MappingException(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.
MappingException(string, string, string, string, Exception)
Initializes a new instance of the MappingException class.
public MappingException(string message, string propertyName, string propertyValue, string targetTypeName, Exception innerException)
Parameters
messagestringThe error message that explains the reason for the exception.
propertyNamestringThe name of the property which caused the exception
propertyValuestringThe string representation of the property value which caused the exception
targetTypeNamestringThe TargetTypeName of the target entity
innerExceptionExceptionThe exception that is the cause of the current exception, or a null reference if no inner exception is specified.
Properties
PropertyName
Gets the name of the property which caused the exception.
public string PropertyName { get; }
Property Value
- string
The name of the property.
PropertyValue
Gets the string representation of the property value which caused the exception.
public string PropertyValue { get; }
Property Value
- string
The property value.
TargetTypeName
Gets the TargetTypeName of the target entity.
public string TargetTypeName { get; }
Property Value
- string
The name of the target type.
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()