Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExceptionPropertiesBag"/> class.
 /// </summary>
 /// <param name="exception">The exception which properties will be added to the bag.</param>
 /// <param name="filter">Filter that should be applied to each property just before adding it to the bag.</param>
 public ExceptionPropertiesBag(Exception exception, IExceptionPropertyFilter filter = null)
 {
     this.exception = exception ?? throw new ArgumentNullException(
                                nameof(exception),
                                $"Cannot create {nameof(ExceptionPropertiesBag)} for null exception");
     this.filter = filter;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExceptionPropertiesBag"/> class.
 /// </summary>
 /// <param name="exception">The exception which properties will be added to the bag.</param>
 /// <param name="filter">Filter that should be applied to each property just before adding it to the bag.</param>
 public ExceptionPropertiesBag(Exception exception, IExceptionPropertyFilter filter = null)
 {
     this.exception = exception ?? throw new ArgumentNullException(nameof(exception));
     this.filter    = filter;
 }
Beispiel #3
0
 public ExceptionPropertyBag(Exception exception, IExceptionPropertyFilter filter = null)
 {
     _exception  = exception ?? throw new ArgumentNullException(nameof(exception));
     _filter     = filter;
     _properties = new Dictionary <string, object>();
 }