Table of Contents

FirstOrDefaultReaderConverter Method

Definition

FirstOrDefaultReaderConverter(IList<XmlConverter>, Type)

Returns the first XmlConverter of the converters that CanConvert(Type) and CanRead the specified objectType; otherwise null if no XmlConverter is found.

public static XmlConverter FirstOrDefaultReaderConverter(this IList<XmlConverter> converters, Type objectType)

Parameters

converters IList<XmlConverter>

The IList<T> to extend.

objectType Type

Type of the object to deserialize.

Returns

XmlConverter

An XmlConverter that can deserialize the specified objectType; otherwise null.

Exceptions

ArgumentNullException

converters cannot be null.