Table of Contents

CreateException Method

Definition

CreateException(IDecorator<Stack<IList<MemberArgument>>>, bool)

Converts the underlying Stack<T> of the decorator that has one or more sequences of MemberArgument into an Exception. This API supports the product infrastructure and is not intended to be used directly from your code.

public static Exception CreateException(this IDecorator<Stack<IList<MemberArgument>>> decorator, bool parseAsXml = false)

Parameters

decorator IDecorator<Stack<IList<MemberArgument>>>

The IDecorator<T> to extend.

parseAsXml bool

When true, the Message is parsed using \n as newline; otherwise NewLine is used. Reason for this design is explained here: https://www.w3.org/TR/REC-xml/#sec-line-ends

Returns

Exception

An instance of an Exception if the conversion was successful; null otherwise.

Exceptions

ArgumentNullException

decorator cannot be null.