﻿namespace Pote.CommandLine.Mocks
{
    /// <summary>
    /// Command with a rejecting validator on a named, optional, primitive option.
    /// </summary>
    public class CommandWithRejectingValidatorOnOptionalNamedPrimitiveOption : Command
    {
        /// <summary>
        /// Some option.
        /// </summary>
        [Option('i', "int")]
        [MyValidator(false)]
        protected int MyOption
        {
            get;
            set;
        }

        /// <summary>
        /// Returns the value of <see cref="MyOption"/>.
        /// </summary>
        /// <returns>The value of <see cref="MyOption"/>.</returns>
        public override int Execute()
        {
            return MyOption;
        }
    }
}