EventFeed.cs CampusAppWP8::Api::Events::EventFeed CampusAppWP8::Api::Events <<<<<<< HEAD usingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Threading.Tasks; usingCampusAppWP8.Model.events_news; usingCampusAppWP8.Utility; namespaceCampusAppWP8.Api.Events { publicclassEventFeed:XmlFeed<RSSViewModel> { publicEventFeed():base(URLList.EventsFeedURL,"EventFeed.xml") { } protectedoverrideboolCheckIsModelUpToDate() { returnfalse; } protectedoverrideboolCheckIsFileUpToDate() { returntrue; } } } ======= //----------------------------------------------------------------------- //<copyrightfile="EventFeed.cs"company="BTU/IIT"> //Companycopyrighttag. //</copyright> //<author>fiedlchr</author> //<sience>24.06.2013</sience> //---------------------------------------------------------------------- namespaceCampusAppWP8.Feed.Events { usingSystem.IO; usingCampusAppWP8.Model; usingCampusAppWP8.Model.RSS; usingCampusAppWP8.Resources; usingCampusAppWP8.Utility; publicclassEventFeed:XmlModel<RSSViewModel> { publicEventFeed(boolautoLoad=true) :base(ModelType.FileAndFeed,Constants.FileEvents_Name,Constants.UrlEvents_Addr) { this.isFileUpToDate+=newIsFileUpToDate(this.CheckIsFileUpToDate); this.isModelUpToDate+=newIsModelUpToDate(this.CheckIsModelUpToDate); if(autoLoad==true) { this.LoadData(); } } privateboolCheckIsModelUpToDate(RSSViewModelmodel) { boolretValue=true; if(model==null) { retValue=false; } else { retValue=Utilities.DayDifference(Utilities.DifferenceType.Less,model.CreateTime,1.0); } returnretValue; } privateboolCheckIsFileUpToDate(RSSViewModelmodel,FileInfoinfo) { boolretValue=true; if(model==null) { //atloading if(info.Exists==true) { retValue=Utilities.DayDifference(Utilities.DifferenceType.Less,info.LastWriteTime,1.0); } } else { //atsaving if((info.Exists==false) ||(info.Length==0)) { retValue=false; } } returnretValue; } } } >>>>>>> develmaster