Show / Hide Table of Contents

    Class XmlConverterListExtensions

    Extension methods for the System.Collections.Generic.IList<T>.

    Inheritance
    System.Object
    XmlConverterListExtensions
    Namespace: Cuemon.Serialization.Xml.Converters
    Assembly: Cuemon.Serialization.Xml.dll
    Syntax
    public static class XmlConverterListExtensions

    Methods

    | Improve this Doc

    AddDateTimeConverter(IList<XmlConverter>)

    Adds an System.DateTime XML converter to the list.

    Declaration
    public static void AddDateTimeConverter(this IList<XmlConverter> converters)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<XmlConverter> converters

    The list of XML converters.

    | Improve this Doc

    AddEnumerableConverter(IList<XmlConverter>)

    Adds an System.Collections.IEnumerable XML converter to the list.

    Declaration
    public static void AddEnumerableConverter(this IList<XmlConverter> converters)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<XmlConverter> converters

    The list of XML converters.

    | Improve this Doc

    AddExceptionConverter(IList<XmlConverter>, Boolean)

    Adds an System.Exception XML converter to the list.

    Declaration
    public static void AddExceptionConverter(this IList<XmlConverter> converters, bool includeStackTrace)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<XmlConverter> converters

    The list of XML converters.

    System.Boolean includeStackTrace

    if set to true the stack of an exception is included.

    | Improve this Doc

    AddExceptionConverter(IList<XmlConverter>, Func<Boolean>)

    Adds an System.Exception XML converter to the list.

    Declaration
    public static void AddExceptionConverter(this IList<XmlConverter> converters, Func<bool> includeStackTraceFactory)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<XmlConverter> converters

    The list of XML converters.

    System.Func<System.Boolean> includeStackTraceFactory

    The function delegate that is invoked when it is needed to determine whether the stack of an exception is included in the converted result.

    | Improve this Doc

    AddExceptionDescriptorConverter(IList<XmlConverter>, Action<ExceptionDescriptorSerializationOptions>)

    Adds an ExceptionDescriptor XML converter to the list.

    Declaration
    public static void AddExceptionDescriptorConverter(this IList<XmlConverter> converters, Action<ExceptionDescriptorSerializationOptions> setup = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<XmlConverter> converters

    The list of XML converters.

    System.Action<ExceptionDescriptorSerializationOptions> setup

    The ExceptionDescriptorSerializationOptions which need to be configured.

    | Improve this Doc

    AddStringConverter(IList<XmlConverter>)

    Adds an System.String XML converter to the list.

    Declaration
    public static void AddStringConverter(this IList<XmlConverter> converters)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<XmlConverter> converters

    The list of XML converters.

    | Improve this Doc

    AddTimeSpanConverter(IList<XmlConverter>)

    Adds an System.TimeSpan XML converter to the list.

    Declaration
    public static void AddTimeSpanConverter(this IList<XmlConverter> converters)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<XmlConverter> converters

    The list of XML converters.

    | Improve this Doc

    AddUriConverter(IList<XmlConverter>)

    Adds an System.Uri XML converter to the list.

    Declaration
    public static void AddUriConverter(this IList<XmlConverter> converters)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<XmlConverter> converters

    The list of XML converters.

    | Improve this Doc

    AddXmlConverter<T>(IList<XmlConverter>, Action<XmlWriter, T, XmlQualifiedEntity>, Func<XmlReader, Type, T>, Func<Type, Boolean>, XmlQualifiedEntity)

    Adds an XML converter to the list.

    Declaration
    public static void AddXmlConverter<T>(this IList<XmlConverter> converters, Action<XmlWriter, T, XmlQualifiedEntity> writer = null, Func<XmlReader, Type, T> reader = null, Func<Type, bool> canConvertPredicate = null, XmlQualifiedEntity qe = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<XmlConverter> converters

    The list of XML converters.

    System.Action<System.Xml.XmlWriter, T, XmlQualifiedEntity> writer

    The delegate that converts T to its XML representation.

    System.Func<System.Xml.XmlReader, System.Type, T> reader

    The delegate that generates T from its XML representation.

    System.Func<System.Type, System.Boolean> canConvertPredicate

    The delegate that determines if an object can be converted.

    XmlQualifiedEntity qe

    The optional XmlQualifiedEntity that will provide the name of the root element.

    Type Parameters
    Name Description
    T

    The type of the object to converts to and from XML.

    | Improve this Doc

    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.

    Declaration
    public static XmlConverter FirstOrDefaultReaderConverter(this IList<XmlConverter> converters, Type objectType)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<XmlConverter> converters

    The list of XML converters.

    System.Type objectType

    Type of the object to deserialize.

    Returns
    Type Description
    XmlConverter

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

    | Improve this Doc

    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.

    Declaration
    public static XmlConverter FirstOrDefaultWriterConverter(this IList<XmlConverter> converters, Type objectType)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<XmlConverter> converters

    The list of XML converters.

    System.Type objectType

    Type of the object to serialize.

    Returns
    Type Description
    XmlConverter

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

    | Improve this Doc

    InsertXmlConverter<T>(IList<XmlConverter>, Int32, Action<XmlWriter, T, XmlQualifiedEntity>, Func<XmlReader, Type, T>, Func<Type, Boolean>, XmlQualifiedEntity)

    Inserts an XML converter to the list at the specified index.

    Declaration
    public static void InsertXmlConverter<T>(this IList<XmlConverter> converters, int index, Action<XmlWriter, T, XmlQualifiedEntity> writer = null, Func<XmlReader, Type, T> reader = null, Func<Type, bool> canConvertPredicate = null, XmlQualifiedEntity qe = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<XmlConverter> converters

    The list of XML converters.

    System.Int32 index

    The zero-based index at which an XML converter should be inserted.

    System.Action<System.Xml.XmlWriter, T, XmlQualifiedEntity> writer

    The delegate that converts T to its XML representation.

    System.Func<System.Xml.XmlReader, System.Type, T> reader

    The delegate that generates T from its XML representation.

    System.Func<System.Type, System.Boolean> canConvertPredicate

    The delegate that determines if an object can be converted.

    XmlQualifiedEntity qe

    The optional XmlQualifiedEntity that will provide the name of the root element.

    Type Parameters
    Name Description
    T

    The type of the object to converts to and from XML.

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX