protected override ConstraintResult matches(object current) { string actual = (string)current; // check length first var result = Delegate.ApplyTo(actual); if (result.IsSuccess) { // if long enough, check uppercase of first character Delegate = new UppercaseConstraint(); result = Delegate.ApplyTo(actual[0]); } return(result); }
protected override ConstraintResult matches(object current) { string actual = (string) current; // check length first var result = Delegate.ApplyTo(actual); if (result.IsSuccess) { // if long enough, check uppercase of first character Delegate = new UppercaseConstraint(); result = Delegate.ApplyTo(actual[0]); } return result; }