FirstOrDefaultReaderConverter Method
Definition
- Namespace
- Cuemon.Xml.Serialization.Converters
- Assemblies
- Cuemon.Xml.dll
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
decoratorIDecorator<IList<XmlConverter>>The decorator that wraps the IList<T> to extend.
objectTypeTypeType of the object to deserialize.
Returns
- XmlConverter
An XmlConverter that can deserialize the specified
objectType; otherwisenull.
Exceptions
- ArgumentNullException
decoratorcannot be null.