예제 #1
0
 public bool ContainsInCourses(ICourse course)
 {
     if (this._courses.Contains(course))
     {
         return(true);
     }
     return(false);
 }
예제 #2
0
        public bool RemoveCourseFromCart(string name)
        {
            ICourse cr = GetCourseFromCart(name);

            if (cr == null)
            {
                return(false);
            }
            if (this._cart.Remove(cr))
            {
                return(true);
            }
            return(false);
        }
예제 #3
0
        //Prototype, State and Visitor together
        public override void visit(CourseCreator courseCreator)
        {
            ICourse ct = courseCreator.prototype.create(preparedCourse);

            courseCreator.database.AddCourse(ct);
        }
예제 #4
0
 public bool AddCourseToCart(ICourse course)
 {
     this._cart.Add(course);
     return(true);
 }