Show / Hide Table of Contents

Class ValidationException

An exception that is thrown out of functions that have no realtime return to another system, for example if a queue function is triggered by a queue item and that item does not conform to the expected validation rules this exception will be thrown so it can at least be logged. In contrast HTTP triggers will return a BadRequest with the ValidationResult serialized in the response.

Inheritance
System.Object
ValidationException
Namespace: FunctionMonkey.Commanding.Abstractions.Validation
Assembly: FunctionMonkey.Commanding.Abstractions.dll
Syntax
public class ValidationException : Exception

Constructors

| Improve this Doc View Source

ValidationException(String, ValidationResult, String)

Constructor for the exception

Declaration
public ValidationException(string functionName, ValidationResult validationResult, string associatedId = null)
Parameters
Type Name Description
System.String functionName

The name of the function that encountered the validation errors

ValidationResult validationResult

The validation result

System.String associatedId

Any associated ID (e.g. a message ID)

Properties

| Improve this Doc View Source

AssociatedId

An associated ID (for example a message ID), or null if none available

Declaration
public string AssociatedId { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

FunctionName

Name of the function that encountered the validation errors

Declaration
public string FunctionName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ValidationResult

The validation result

Declaration
public ValidationResult ValidationResult { get; }
Property Value
Type Description
ValidationResult

Extension Methods

OpenApiFluentValidationHelper.IsNumeric(Object)
OpenApiFluentValidationHelper.NumericToInt(Object)
OpenApiFluentValidationHelper.NumericToDouble(Object)
OpenApiFluentValidationHelper.NumericToDecimal(Object)
  • Improve this Doc
  • View Source
  • 0 Comments
In This Article
  • Constructors
    • ValidationException(String, ValidationResult, String)
  • Properties
    • AssociatedId
    • FunctionName
    • ValidationResult
  • Extension Methods
Back to top Copyright © 2018 James Randall