Show / Hide Table of Contents

Class ValidationResult

Representation of validation results.

Inheritance
System.Object
ValidationResult
Namespace: Amazon.CDK
Assembly: Amazon.CDK.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(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

ValidationResult(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

ValidationResult(String, ValidationResults)

Properties

ErrorMessage
IsSuccess
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(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected ValidationResult(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

ValidationResult(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected ValidationResult(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

ValidationResult(String, ValidationResults)

public ValidationResult(string errorMessage = null, ValidationResults results = null)
Parameters
errorMessage System.String
results ValidationResults

Properties

ErrorMessage

public virtual string ErrorMessage { get; }
Property Value

System.String

IsSuccess

public virtual bool IsSuccess { get; }
Property Value

System.Boolean

Results

public virtual ValidationResults Results { get; }
Property Value

ValidationResults

Methods

AssertSuccess()

Turn a failed validation into an exception.

public virtual void AssertSuccess()

ErrorTree()

Return a string rendering of the tree of validation failures.

public virtual string ErrorTree()
Returns

System.String

Prefix(String)

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

public virtual ValidationResult Prefix(string message)
Parameters
message System.String
Returns

ValidationResult

Back to top Generated by DocFX