ExamListModel.cs CampusAppWP8::Model::Exams::ExamListModel CampusAppWP8::Model::Exams //----------------------------------------------------------------------- //<copyrightfile="ExamlistModel.cs"company="BTU/IIT"> //Companycopyrighttag. //</copyright> //<author>stubbfel</author> //<sience>02.09.2013</sience> //---------------------------------------------------------------------- namespaceCampusAppWP8.Model.Exams { usingSystem.Collections.Generic; usingSystem.Collections.ObjectModel; usingSystem.Xml.Serialization; usingCampusAppWP8.Model.Utility; [XmlRoot("links")] publicclassExamListModel { #regionProperty [XmlElement("link")] publicObservableCollection<ExamModel>Exams{get;set;} #endregion #regionProperty publicList<CourseModel>CreateCourseList() { List<CourseModel>result=newList<CourseModel>(); foreach(ExamModelexaminthis.Exams) { CourseModeltmpModel=newCourseModel(exam.CourseNumber,exam.CourseText); if(!result.Contains(tmpModel)) { result.Add(tmpModel); } } returnresult; } #endregion } }