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