Search documentationEsc

MissMatchedTypeDiscriminatorException

This exception is thrown when the type field does not match the `IItem`'s type.

Namespace: Microsoft.Azure.CosmosRepository.Exceptions
Kind: class

This exception is thrown when the type field does not match the IItem’s type.

public class MissMatchedTypeDiscriminatorException : Exception, ISerializable

Remarks

Creates a MissMatchedTypeDiscriminatorException

Example

Members

Constructor

MissMatchedTypeDiscriminatorException.MissMatchedTypeDiscriminatorException(string, string)

This exception is thrown when the type field does not match the IItem’s type.

public MissMatchedTypeDiscriminatorException(string type, string expectedType)

Parameters

NameTypeDescription
typeStringThe current type on the IItem
expectedTypeStringThe expected type of the IItem

Creates a MissMatchedTypeDiscriminatorException

Propertys

MissMatchedTypeDiscriminatorException.Type

The current type that was present on the IItem

public string Type { get; }

ReturnsString

MissMatchedTypeDiscriminatorException.ExpectedType

The expected type value

public string ExpectedType { get; }

ReturnsString