Пример #1
0
        private static Frame findFrame(FrameCollection frames, BaseConstraint findBy)
        {
            foreach (Frame frame in frames)
            {
                if (findBy.Compare(frame))
                {
                    // Return
                    return(frame);
                }
            }

            throw new FrameNotFoundException(findBy.ConstraintToString());
        }
        private void SelectByTextOrValue(BaseConstraint findBy)
        {
            OptionCollection options = Options.Filter(findBy);

            foreach (Option option in options)
            {
                option.Select();
            }

            if (options.Length == 0)
            {
                throw new SelectListItemNotFoundException(findBy.ConstraintToString());
            }
        }
Пример #3
0
 private static string createMessage(BaseConstraint constraint)
 {
     return(string.Format("The compare methode of a constraint class can't be reentered during execution of the compare. The exception occurred in an instance of '{0}' with constraint: {1}.", constraint.GetType().ToString(), constraint.ConstraintToString()));
 }