using System; using System.ComponentModel; using System.Runtime.Serialization; namespace GitHub.DistributedTask.Pipelines.Validation { /// /// Provides information about the result of input validation. /// [DataContract] [EditorBrowsable(EditorBrowsableState.Never)] public class InputValidationResult { public InputValidationResult() { } /// /// Gets or sets a value indicating whether or not the input value is valid. /// [DataMember(EmitDefaultValue = false)] public Boolean IsValid { get; set; } /// /// Gets or sets a value indicating a detailed reason the input value is not valid. /// [DataMember(EmitDefaultValue = false)] public String Reason { get; set; } /// /// Provides a convenience property to return successful validation results. /// public static readonly InputValidationResult Succeeded = new InputValidationResult { IsValid = true }; } }