Table of Contents

Class MemberArgumentDecoratorExtensions

Namespace
Cuemon.Reflection
Assembly
Cuemon.Core.dll

Extension methods for the MemberArgument class hidden behind the IDecorator<T> interface.

public static class MemberArgumentDecoratorExtensions
Inheritance
Object
MemberArgumentDecoratorExtensions

Methods

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

Converts the underlying System.Collections.Generic.Stack`1 of the decorator that has one or more sequences of MemberArgument into an System.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 Boolean

When true, the System.Exception.Message is parsed using \n as newline; otherwise System.Environment.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 System.Exception if the conversion was successful; null otherwise.

Exceptions

System.ArgumentNullException

decorator cannot be null.

See Also