Antmicro.OptionsParser.Tests.ValidationTests.OptionsWithCustomValidator.Validate C# (CSharp) Метод

Validate() публичный Метод

public Validate ( string &error ) : bool
error string
Результат bool
            public bool Validate(out string error)
            {
                if(NumericValue == 1 && StringValue == "foo")
                {
                    error = "Field cannot have values: 1 and 'foo' at the same time";
                    return false;
                }

                error = null;
                return true;
            }
ValidationTests.OptionsWithCustomValidator