Class ValidationException
- Namespace
- XENBIT.ResQueServe.Core.Exceptions
- Assembly
- RQS.Core.dll
Represents an exception thrown when a validation process encounters one or more problems.
public class ValidationException : ResQueServeException, ISerializable
- Inheritance
-
ValidationException
- Implements
- Inherited Members
Constructors
ValidationException(params ProblemInformation[])
Initializes a new instance of the ValidationException class with the specified validation problems.
public ValidationException(params ProblemInformation[] problems)
Parameters
problemsProblemInformation[]An array of ProblemInformation describing the validation problems.
Methods
HandleDispatcherExceptionOnFrontend(dynamic, string?)
Handles the dispatcher exception on the frontend by modifying the provided view bag.
public override void HandleDispatcherExceptionOnFrontend(dynamic viewBag, string? prefix = null)
Parameters
viewBagdynamicThe dynamic view bag used to display error notifications.
prefixstringAn optional prefix for error messages.
ThrowIfHasProblems(IEnumerable<ProblemInformation>)
Throws a ValidationException if the provided list of problems contains any items.
public static void ThrowIfHasProblems(IEnumerable<ProblemInformation> problems)
Parameters
problemsIEnumerable<ProblemInformation>An enumerable of ProblemInformation to validate.
Exceptions
- ValidationException
Thrown if the provided problems list is not empty.
ThrowIfHasProblems(params ProblemInformation[])
Throws a ValidationException if the provided array of problems contains any items.
public static void ThrowIfHasProblems(params ProblemInformation[] problems)
Parameters
problemsProblemInformation[]An array of ProblemInformation to validate.
Exceptions
- ValidationException
Thrown if the provided problems array is not empty.