Table of Contents

Class ExceptionConverter

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

Converts an Exception to XML.

public class ExceptionConverter : XmlConverter<Exception>
Inheritance
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(Type, XmlReader)

Reads the XML representation of the objectType.

public override Exception ReadXml(Type objectType, XmlReader reader)

Parameters

objectType Type

The Type of the object.

reader XmlReader

The XmlReader to read from.

Returns

Exception

An object of objectType.

WriteXml(XmlWriter, Exception, XmlQualifiedEntity)

Writes the XML representation of the value.

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

Parameters

writer XmlWriter

The XmlWriter to write to.

value Exception

The object to serialize.

elementName XmlQualifiedEntity

The element name to encapsulate around value.

See Also