DepartmentFeed.cs <<<<<<< HEAD CampusAppWP8::Api::Departments::DepartmentFeed CampusAppWP8::Api::Departments System::Collections::Generic System::Linq System::Text System::Threading::Tasks ======= CampusAppWP8::Feed::Departments::DepartmentFeed CampusAppWP8::Feed::Departments >>>>>>> develmaster <<<<<<< HEAD usingCampusAppWP8.Model.Departments; usingCampusAppWP8.Utility; usingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Threading.Tasks; namespaceCampusAppWP8.Api.Departments { classDepartmentFeed:XmlFeed<DepartmentViewModel> { publicDepartmentFeed():base(URLList.DepartmentFeedURL,"DepartmentFeed.xml") { } publicSystem.Collections.ObjectModel.ObservableCollection<FacultyModel>_faculties{get;set;} protectedoverrideboolCheckIsModelUpToDate() { returnfalse; } protectedoverrideboolCheckIsFileUpToDate() { returnfalse; } } } ======= //----------------------------------------------------------------------- //<copyrightfile="DepartmentFeed.cs"company="BTU/IIT"> //Companycopyrighttag. //</copyright> //<author>fiedlchr</author> //<sience>24.06.2013</sience> //---------------------------------------------------------------------- namespaceCampusAppWP8.Feed.Departments { usingSystem.IO; usingCampusAppWP8.Model; usingCampusAppWP8.Model.Departments; usingCampusAppWP8.Resources; usingCampusAppWP8.Utility; publicclassDepartmentFeed:XmlModel<DepartmentModel> { #regionConstructor publicDepartmentFeed(boolautoLoad=true) :base(ModelType.FileAndFeed,Constants.FileDepartment_Name,Constants.UrlDepartment_Addr) { this.isFileUpToDate+=newIsFileUpToDate(this.CheckIsFileUpToDate); this.isModelUpToDate+=newIsModelUpToDate(this.CheckIsModelUpToDate); if(autoLoad==true) { this.LoadData(); } } //Constructor #endregion #regionMethod #regionProtected privateboolCheckIsModelUpToDate(DepartmentModelmodel) { boolretValue=true; if(model==null) { retValue=false; } else { retValue=Utilities.DayDifference(Utilities.DifferenceType.Less,model.CreateTime,7.0); } returnretValue; } privateboolCheckIsFileUpToDate(DepartmentModelmodel,FileInfoinfo) { boolretValue=true; if(model==null) { //atloading if(info.Exists==true) { retValue=Utilities.DayDifference(Utilities.DifferenceType.Less,info.LastWriteTime,7.0); } } else { //atsaving if((info.Exists==false) ||(info.Length==0)) { retValue=false; } } returnretValue; } //Protedted #endregion //Method #endregion } } >>>>>>> develmaster