Show / Hide Table of Contents

Class ValidationResult

Representation of validation results.

Inheritance
object
ValidationResult
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ValidationResult : DeputyBase
Syntax (vb)
Public Class ValidationResult Inherits DeputyBase
Remarks

Models a tree of validation errors so that we have as much information as possible about the failure that occurred.

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK;

             ValidationResults validationResults;

             var validationResult = new ValidationResult("errorMessage", validationResults);

Synopsis

Constructors

ValidationResult(string?, ValidationResults?)

Representation of validation results.

Properties

ErrorMessage

Representation of validation results.

IsSuccess

Representation of validation results.

Results

Representation of validation results.

Methods

AssertSuccess()

Turn a failed validation into an exception.

ErrorTree()

Return a string rendering of the tree of validation failures.

Prefix(string)

Wrap this result with an error message, if it concerns an error.

Constructors

ValidationResult(string?, ValidationResults?)

Representation of validation results.

public ValidationResult(string? errorMessage = null, ValidationResults? results = null)
Parameters
errorMessage string
results ValidationResults
Remarks

Models a tree of validation errors so that we have as much information as possible about the failure that occurred.

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK;

             ValidationResults validationResults;

             var validationResult = new ValidationResult("errorMessage", validationResults);

Properties

ErrorMessage

Representation of validation results.

public virtual string ErrorMessage { get; }
Property Value

string

Remarks

Models a tree of validation errors so that we have as much information as possible about the failure that occurred.

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK;

             ValidationResults validationResults;

             var validationResult = new ValidationResult("errorMessage", validationResults);

IsSuccess

Representation of validation results.

public virtual bool IsSuccess { get; }
Property Value

bool

Remarks

Models a tree of validation errors so that we have as much information as possible about the failure that occurred.

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK;

             ValidationResults validationResults;

             var validationResult = new ValidationResult("errorMessage", validationResults);

Results

Representation of validation results.

public virtual ValidationResults Results { get; }
Property Value

ValidationResults

Remarks

Models a tree of validation errors so that we have as much information as possible about the failure that occurred.

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK;

             ValidationResults validationResults;

             var validationResult = new ValidationResult("errorMessage", validationResults);

Methods

AssertSuccess()

Turn a failed validation into an exception.

public virtual void AssertSuccess()
Remarks

Models a tree of validation errors so that we have as much information as possible about the failure that occurred.

ExampleMetadata: fixture=_generated

ErrorTree()

Return a string rendering of the tree of validation failures.

public virtual string ErrorTree()
Returns

string

Remarks

Models a tree of validation errors so that we have as much information as possible about the failure that occurred.

ExampleMetadata: fixture=_generated

Prefix(string)

Wrap this result with an error message, if it concerns an error.

public virtual ValidationResult Prefix(string message)
Parameters
message string
Returns

ValidationResult

Remarks

Models a tree of validation errors so that we have as much information as possible about the failure that occurred.

ExampleMetadata: fixture=_generated

Back to top Generated by DocFX