FirstOrDefaultWriterConverter Method
Definition
- Namespace
- Cuemon.Extensions.Xml.Serialization.Converters
- Assemblies
- Cuemon.Extensions.Xml.dll
FirstOrDefaultWriterConverter(IList<XmlConverter>, Type)
Returns the first XmlConverter of the converters that CanConvert(Type) and CanWrite the specified objectType; otherwise null if no XmlConverter is found.
public static XmlConverter FirstOrDefaultWriterConverter(this IList<XmlConverter> converters, Type objectType)
Parameters
convertersIList<XmlConverter>The IList<T> to extend.
objectTypeTypeType of the object to serialize.
Returns
- XmlConverter
An XmlConverter that can serialize the specified
objectType; otherwisenull.
Exceptions
- ArgumentNullException
converterscannot be null.