private SyndicationItem CreateSyndicationItem(RigaBuildingPermit buildingPermit) { string searchString = buildingPermit.Object .Replace('(', ' ') .Replace(')', ' '); while (searchString.Contains(" ")) { searchString = searchString.Replace(" ", " "); } Dictionary <string, string> query = new Dictionary <string, string> { ["search"] = searchString }; query["date_to"] = query["date_from"] = buildingPermit.PreparationDate.ToString(RigaBuildingPermitRepository.DateFormat); UriBuilder uriBuilder = new UriBuilder(RigaBuildingPermitRepository.BaseUrl) { Query = RepositoryHelper.GetQueryString(query), }; SyndicationItem item = new SyndicationItem(buildingPermit.Object, buildingPermit.ObjectAddress, uriBuilder.Uri) { PublishDate = FeedHelper.GetDateTimeOffsetLV(buildingPermit.PreparationDate), }; return(item); }
private SyndicationItem CreateSyndicationItem(TransportProject transportProject) { SyndicationItem item = new SyndicationItem(transportProject.Name, transportProject.ApplyingInfo, TransportProjectRepository.BaseUrl) { PublishDate = FeedHelper.GetDateTimeOffsetLV(transportProject.PublishDate), }; return(item); }
private SyndicationItem CreateSyndicationItem(AgricultureProject agricultureProject) { SyndicationItem item = new SyndicationItem(agricultureProject.Name, agricultureProject.Description, agricultureProject.Url) { PublishDate = FeedHelper.GetDateTimeOffsetLV(agricultureProject.PublishDate), }; return(item); }