ValidationResult<TResult,TError> Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a validation result that can be either valid or invalid.
public readonly struct ValidationResult<TResult,TError> : IEquatable<Microsoft.IdentityModel.Tokens.Experimental.ValidationResult<TResult,TError>>
type ValidationResult<'Result, 'Error> = struct
Public Structure ValidationResult(Of TResult, TError)
Implements IEquatable(Of ValidationResult(Of TResult, TError))
Type Parameters
- TResult
- TError
- Inheritance
-
ValidationResult<TResult,TError>
- Implements
-
IEquatable<ValidationResult<TResult,TError>>
Constructors
ValidationResult<TResult,TError>() |
Obsolete.
Empty constructor implementation to prevent creating an empty result. |
ValidationResult<TResult,TError>(TError) |
Creates a new instance of ValidationResult<TResult,TError> indicating a failed operation and containing an error information. |
ValidationResult<TResult,TError>(TResult) |
Creates a new instance of ValidationResult<TResult,TError> indicating a successful operation and containing an object of the associated type. |
Properties
Error |
Gets the error associated with the validation result. |
IsValid |
Gets a value indicating whether the result is valid. |
Result |
Gets the result associated with the validation result. |
Methods
Equals(Object) |
Determines whether the specified object is equal to the current instance of ValidationResult<TResult,TError>. |
Equals(ValidationResult<TResult,TError>) |
Determines whether the specified ValidationResult<TResult,TError> is equal to the current instance. |
GetHashCode() |
Returns the hash code for this instance of ValidationResult<TResult,TError>. |
ToValidationResult() |
Casts the result to a ValidationResult<TResult,TError>. |