Table of Contents

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

info SerializationInfo

The SerializationInfo that holds the serialized object data about the exception being thrown.

context StreamingContext

The 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

message string

The error message that explains the reason for the exception.

propertyName string

The name of the property which caused the exception

propertyValue string

The string representation of the property value which caused the exception

targetTypeName string

The TargetTypeName of the target entity

innerException Exception

The 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

info SerializationInfo

The SerializationInfo that holds the serialized object data about the exception being thrown.

context StreamingContext

The StreamingContext that contains contextual information about the source or destination.

ToString()

Returns a string that represents this instance.

public override string ToString()

Returns

string

A string that represents this instance.

See Also