/// <summary> /// Executes a handler on all parse exceptions that occurred during processing /// </summary> /// <param name="handler">The handler.</param> public virtual void WhenError(Action <IEnumerable <ParseException> > handler) { if (ParseExceptions.Any()) { handler(ParseExceptions); } }
/// <summary> /// Initializes a new instance of the <see cref="ConsumptionResult" /> class. /// </summary> /// <param name="parseExceptions">The parse exceptions.</param> public ConsumptionResult(params ParseException[] parseExceptions) { foreach (var parseException in parseExceptions.PreventNull()) { ParseExceptions.Add(parseException); } }