Table of Contents

Class ExceptionConverter

Namespace
Cuemon.Xml.Serialization.Converters
Assembly
Cuemon.Xml.dll

Converts an System.Exception to XML.

public class ExceptionConverter : XmlConverter<Exception>
Inheritance
Object
XmlConverter<Exception>
ExceptionConverter
Inherited Members

Constructors

ExceptionConverter(Boolean, Boolean)

Initializes a new instance of the ExceptionConverter class.

public ExceptionConverter(bool includeStackTrace = false, bool includeData = false)

Parameters

includeStackTrace Boolean

A value that indicates if the stack of an exception is included in the converted result.

includeData Boolean

A value that indicates if the data of an exception is included in the converted result.

Properties

IncludeData

Gets a value indicating whether the data of an exception is included in the converted result.

public bool IncludeData { get; }

Property Value

Boolean

true if the data of an exception is included in the converted result; otherwise, false.

IncludeStackTrace

Gets a value indicating whether the stack of an exception is included in the converted result.

public bool IncludeStackTrace { get; }

Property Value

Boolean

true if the stack of an exception is included in the converted result; otherwise, false.

Methods

ReadXml(XmlReader, Type)

Reads the XML representation of the objectType.

public override object ReadXml(XmlReader reader, Type objectType)

Parameters

reader XmlReader

The System.Xml.XmlReader to read from.

objectType Type

The System.Type of the object.

Returns

Object

An object of objectType.

WriteXml(XmlWriter, Object, XmlQualifiedEntity)

Writes the XML representation of the value.

public override void WriteXml(XmlWriter writer, object value, XmlQualifiedEntity elementName = null)

Parameters

writer XmlWriter

The System.Xml.XmlWriter to write to.

value Object

The object to serialize.

elementName XmlQualifiedEntity

The element name to encapsulate around value.

See Also