Ejemplo n.º 1
0
        public Program()
        {
            DefaultIIndexableCollection<Course> UOfTCourses;
            DefaultIIndexableCollection<SchoolProgram> UOfTPrograms;
            IdSigner<Course> courseSigner = new IdSigner<Course>();
            IdSigner<SchoolProgram> progSigner = new IdSigner<SchoolProgram>();

            IItemFetcher<UTCourse> artsciCourseFetcher = new UTArtsciCourseFetcher();
            IItemFetcher<UTCourse> engCourseFetcher = new UTEngCourseFetcher();

            UOfTCourses = new DefaultIIndexableCollection<Course>("University of Toronto", "uoft_courses", courseSigner, artsciCourseFetcher.FetchItems().Concat<UTCourse>(engCourseFetcher.FetchItems()));
            UOfTCourses.Save();

            IItemFetcher<SchoolProgram> artsciProgramFetcher = new UTArtsciProgramFetcher();
            UOfTPrograms = new DefaultIIndexableCollection<SchoolProgram>("University of Toronto", "uoft_progs", progSigner, artsciProgramFetcher.FetchItems());
            UOfTPrograms.Save();
        }
Ejemplo n.º 2
0
        public Program()
        {
            DefaultIIndexableCollection<Course> UOfTCourses;
            DefaultIIndexableCollection<SchoolProgram> UOfTPrograms;
            IdSigner<Course> courseSigner = new IdSigner<Course>();
            IdSigner<SchoolProgram> progSigner = new IdSigner<SchoolProgram>();

            IItemFetcher<UTCourse> artsciCourseFetcher = new UTArtsciCourseFetcher();
            IItemFetcher<UTCourse> artsciSeminarFetcher = new UTArtsciSeminarFetcher();
            IItemFetcher<UTCourse> engCourseFetcher = new UTEngCourseFetcher();
            IItemFetcher<UTCourse> utscCourseFetcher = new UTSCCourseFetcher();
            IItemFetcher<UTCourse> utmCourseFetcher = new UTMCourseFetcher();

            UOfTCourses = new DefaultIIndexableCollection<Course>("University of Toronto", "uoft_courses", courseSigner,
                engCourseFetcher.FetchItems()
                //artsciCourseFetcher.FetchItems()
                //utscCourseFetcher.FetchItems()
                .Concat<UTCourse>(artsciCourseFetcher.FetchItems())
                //.Concat<UTCourse>(artsciSeminarFetcher.FetchItems())
                .Concat<UTCourse>(utscCourseFetcher.FetchItems())
                .Concat<UTCourse>(utmCourseFetcher.FetchItems())
                );
            UOfTCourses.SaveBin();

            IItemFetcher<SchoolProgram> artsciProgramFetcher = new UTArtsciProgramFetcher();
            IItemFetcher<SchoolProgram> engProgramFetcher = new UTEngProgramFetcher(WebUrlConstants.EngPrograms);
            IItemFetcher<SchoolProgram> utscProgramFetcher = new UTSCProgramFetcher();
            IItemFetcher<SchoolProgram> utmProgramFetcher = new UTMProgramFetcher();

            UOfTPrograms = new DefaultIIndexableCollection<SchoolProgram>("University of Toronto", "uoft_progs", progSigner,
                artsciProgramFetcher.FetchItems()
                .Concat<SchoolProgram>(engProgramFetcher.FetchItems())
                .Concat<SchoolProgram>(utscProgramFetcher.FetchItems())
                .Concat<SchoolProgram>(utmProgramFetcher.FetchItems()));
            UOfTPrograms.SaveBin();
        }