Class ExceptionDecoratorExtensions
- Namespace
- Cuemon
- Assembly
- Cuemon.Core.dll
Extension methods for the Exception class hidden behind the IDecorator<T> interface.
public static class ExceptionDecoratorExtensions
- Inheritance
-
ExceptionDecoratorExtensions
Methods
Flatten(IDecorator<Exception>)
Flattens any inner exceptions from the enclosed Exception of the decorator into an IEnumerable<T> sequence of exceptions.
public static IEnumerable<Exception> Flatten(this IDecorator<Exception> decorator)
Parameters
decoratorIDecorator<Exception>The IDecorator<T> to extend.
Returns
- IEnumerable<Exception>
An empty IEnumerable<T> sequence if no inner exception(s) was specified; otherwise any inner exception(s) chained to the enclosed Exception of the
decorator.
Remarks
If any inner exceptions are referenced, this method will iterative flatten them all from the enclosed Exception of the decorator.
Should the enclosed Exception of the decorator be of AggregateException, the return sequence of this method will be equal to the result of the InnerExceptions property after a call to Flatten().
Exceptions
- ArgumentNullException
decoratorcannot be null.
See Also
IDecorator<T>
Decorator<T>