public SubscriptionController( ILogger <SubscriptionController> logger, IOptions <AppSettings> settings, SyndicationService syndicationFeedService) : base(logger, settings) { _syndicationFeedService = syndicationFeedService; }
public SubscriptionController( SyndicationService syndicationService, CategoryService categoryService, IBlogConfig blogConfig) { _syndicationService = syndicationService; _categoryService = categoryService; _blogConfig = blogConfig; }
private async Task <SyndicationFeed> GetFeed(string channel, string referrer, string filter, string jobProfiles, string regions, string format) { var mandator = await GetMandator(); var jobs = await GetJobs(channel, filter, jobProfiles, regions); var syndicationService = new SyndicationService(mandator, _urlBuilder); return(syndicationService.BuildFeed(jobs, Request.Url, referrer, format.Is("html"))); }
public SubscriptionController( ILogger <SubscriptionController> logger, IOptions <AppSettings> settings, SyndicationService syndicationFeedService, CategoryService categoryService, IBlogConfig blogConfig, IFileSystemOpmlWriter fileSystemOpmlWriter) : base(logger, settings) { _syndicationFeedService = syndicationFeedService; _categoryService = categoryService; _blogConfig = blogConfig; _fileSystemOpmlWriter = fileSystemOpmlWriter; }
public async Task <ActionResult> Xml(string channel, string referrer, string filter, string jobProfiles, string regions, string format) { referrer = referrer ?? _referrerService.GetReferrer(Request) ?? "XML"; var mandator = await GetMandator(); var jobs = await GetJobs(channel, filter, jobProfiles, regions); var syndicationService = new SyndicationService(mandator, _urlBuilder); return(new XmlActionResult { Xml = syndicationService.BuildXml(jobs, Request.Url, referrer, format.Is("html")) }); }
public void ProcessRequest(HttpContext context) { var syndicationService = new SyndicationService(); SyndicationFeed feed = syndicationService.GetFeed(); var output = new StringWriter(); var writer = new XmlTextWriter(output); var feedWritter = new Rss20FeedFormatter(feed); feedWritter.WriteTo(writer); context.Response.ContentType = "application/rss_xml"; context.Response.AppendHeader("Content-Disposition", "inline; filename=rss.xml"); context.Response.Write(output.ToString()); }
public SyndicationController(SyndicationService _syndicationService, SeoService seoService) { this._syndicationService = _syndicationService; this.seoService = seoService; }