Show / Hide Table of Contents

Class ValidationResult

Represents the result of a validation operation.

Inheritance
System.Object
ValidationResult
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: MediatorForge.Utilities
Assembly: MediatorForge.dll
Syntax
public class ValidationResult

Constructors

| Improve this Doc View Source

ValidationResult(IEnumerable<ValidationError>)

Initializes a new instance of the ValidationResult class with a collection of validation errors.

Declaration
public ValidationResult(IEnumerable<ValidationError> errors)
Parameters
Type Name Description
IEnumerable<ValidationError> errors

The collection of validation errors.

Properties

| Improve this Doc View Source

Errors

Gets the collection of validation errors.

Declaration
public IEnumerable<ValidationError> Errors { get; }
Property Value
Type Description
IEnumerable<ValidationError>
| Improve this Doc View Source

IsValid

Gets a value indicating whether the validation was successful.

Declaration
public bool IsValid { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Success

Gets a ValidationResult that represents a successful validation.

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

Methods

| Improve this Doc View Source

Failure(IEnumerable<ValidationError>)

Creates a ValidationResult that represents a failed validation with the specified errors.

Declaration
public static ValidationResult Failure(IEnumerable<ValidationError> errors)
Parameters
Type Name Description
IEnumerable<ValidationError> errors

The collection of validation errors.

Returns
Type Description
ValidationResult

A ValidationResult that represents a failed validation.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX