Search Results for

    Show / Hide Table of Contents

    Class DelegateValidator

    Implements a validator with an anonymous function

    Inheritance
    System.Object
    DelegateValidator
    Implements
    ICommandValidator
    IArgumentValidator
    IOptionValidator
    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: McMaster.Extensions.CommandLineUtils.Validation
    Assembly: McMaster.Extensions.CommandLineUtils.dll
    Syntax
    public class DelegateValidator : ICommandValidator, IArgumentValidator, IOptionValidator

    Constructors

    | Improve this Doc View Source

    DelegateValidator(Func<ValidationContext, ValidationResult>)

    Initializes an instance of DelegateValidator.

    Declaration
    public DelegateValidator(Func<ValidationContext, ValidationResult> validator)
    Parameters
    Type Name Description
    System.Func<System.ComponentModel.DataAnnotations.ValidationContext, System.ComponentModel.DataAnnotations.ValidationResult> validator

    Explicit Interface Implementations

    | Improve this Doc View Source

    IArgumentValidator.GetValidationResult(CommandArgument, ValidationContext)

    Declaration
    ValidationResult IArgumentValidator.GetValidationResult(CommandArgument argument, ValidationContext context)
    Parameters
    Type Name Description
    CommandArgument argument
    System.ComponentModel.DataAnnotations.ValidationContext context
    Returns
    Type Description
    System.ComponentModel.DataAnnotations.ValidationResult
    | Improve this Doc View Source

    ICommandValidator.GetValidationResult(CommandLineApplication, ValidationContext)

    Declaration
    ValidationResult ICommandValidator.GetValidationResult(CommandLineApplication command, ValidationContext context)
    Parameters
    Type Name Description
    CommandLineApplication command
    System.ComponentModel.DataAnnotations.ValidationContext context
    Returns
    Type Description
    System.ComponentModel.DataAnnotations.ValidationResult
    | Improve this Doc View Source

    IOptionValidator.GetValidationResult(CommandOption, ValidationContext)

    Declaration
    ValidationResult IOptionValidator.GetValidationResult(CommandOption option, ValidationContext context)
    Parameters
    Type Name Description
    CommandOption option
    System.ComponentModel.DataAnnotations.ValidationContext context
    Returns
    Type Description
    System.ComponentModel.DataAnnotations.ValidationResult

    Implements

    ICommandValidator
    IArgumentValidator
    IOptionValidator
    • Improve this Doc
    • View Source
    In This Article
    Back to top