Пример #1
0
        public void RetrieveCourses()
        {
            var listRequest = service.Courses.List();
            var response    = listRequest.Execute();

            if (response.Courses != null && response.Courses.Count > 0)
            {
                foreach (var c in response.Courses)
                {
                    CourseWrapper cw = new CourseWrapper(c);
                    courses.AddUnique(cw.ID, cw);
                    NewCourseAdded?.Invoke(this, new NewIdentifiableAddedEventArgs(cw));
                }
            }
        }
Пример #2
0
        public void AddCourse(string courseId)
        {
            CourseWrapper newCourse = Connection.instance.GetCourse(courseId);

            courses.Add(newCourse);
        }