CheckControlId() public method

public CheckControlId ( Id id ) : void
id Id
return void
Esempio n. 1
0
        // Return if a give course uses a given control.
        public static bool CourseUsesControl(EventDB eventDB, CourseDesignator courseDesignator, Id<ControlPoint> controlId)
        {
            eventDB.CheckControlId(controlId);

            foreach (Id<CourseControl> courseControlId in EnumCourseControlIds(eventDB, courseDesignator)) {
                if (eventDB.GetCourseControl(courseControlId).control == controlId)
                    return true;
            }

            return false;
        }