ExamListModel.cs CampusAppWPortalLib8::Model::Exams::ExamListModel< T > CampusAppWPortalLib8::Model::Exams //----------------------------------------------------------------------- //<copyrightfile="ExamListModel.cs"company="BTU/IIT"> //TheMITLicense(MIT).Copyright(c)2013BTU/IIT. //</copyright> //<author>Stubbfel</author> //<date>15.10.2013</date> //<summary>Implementstheexamlistmodelclass</summary> //----------------------------------------------------------------------- namespaceCampusAppWPortalLib8.Model.Exams { usingSystem.Collections.Generic; usingSystem.Collections.ObjectModel; usingSystem.Xml.Serialization; usingCampusAppWPortalLib8.Model.Utility; [XmlRoot("links")] publicclassExamListModel<T>whereT:ExamModel { #regionProperty [XmlElement("link")] publicObservableCollection<T>Exams{get;set;} #endregion #regionProperty publicList<CourseModel>CreateCourseList() { List<CourseModel>result=newList<CourseModel>(); foreach(Texaminthis.Exams) { CourseModeltmpModel=newCourseModel(exam.CourseNumber,exam.CourseText); if(!result.Contains(tmpModel)) { result.Add(tmpModel); } } returnresult; } #endregion } }