<commit_before>﻿using Microsoft.AspNetCore.Mvc;
using System.ServiceModel.Syndication;
using System.Xml;

namespace Firehose.Web.Infrastructure
{
	public class RssFeedResult : ActionResult
	{
		private readonly SyndicationFeed _feed;

		public RssFeedResult(SyndicationFeed feed)
		{
			_feed = feed;
		}

		public override void ExecuteResult(ActionContext context)
		{
			context.HttpContext.Response.ContentType = "application/rss+xml";

			var rssFormatter = new Rss20FeedFormatter(_feed);
			using (var writer = XmlWriter.Create(context.HttpContext.Response.Body))
			{
				rssFormatter.WriteTo(writer); 
			}
		}
	}
}<commit_msg>Convert RssFeedResult to async (#741)<commit_after>using Microsoft.AspNetCore.Mvc;
using System.ServiceModel.Syndication;
using System.Xml;

namespace Firehose.Web.Infrastructure
{
	public class RssFeedResult : ActionResult
	{
		private readonly SyndicationFeed _feed;

		public RssFeedResult(SyndicationFeed feed)
		{
			_feed = feed;
		}

		public async override Task ExecuteResultAsync(ActionContext context)
		{
			context.HttpContext.Response.ContentType = "application/rss+xml";

			var rssFormatter = new Rss20FeedFormatter(_feed);
			using (var writer = XmlWriter.Create(context.HttpContext.Response.Body))
			{
				rssFormatter.WriteTo(writer);
				await writer.FlushAsync();
			}
		}
	}
}
{'fraction_non_alphanumeric': 0.0915915915915916, 'fraction_numerical': 0.005255255255255256, 'mean_word_length': 4.696581196581197, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6738485', 'n_tokens_mistral': 469, 'n_tokens_neox': 412, 'n_words': 81}