Table of Contents

FirstOrDefaultReaderConverter Method

Definition

FirstOrDefaultReaderConverter(IDecorator<IList<XmlConverter>>, Type)

Returns the first XmlConverter of the enclosed IList<T> of the specified decorator that CanConvert(Type) and CanRead the specified objectType; otherwise null if no XmlConverter is found.

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

Parameters

decorator IDecorator<IList<XmlConverter>>

The decorator that wraps 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

decorator cannot be null.