Aqueduct.Appia.Host.HtmlExporter.ConvertNancyResponseToResponse C# (CSharp) Method

ConvertNancyResponseToResponse() private static method

private static ConvertNancyResponseToResponse ( Response nancyResponse, string filePath ) : void
nancyResponse Nancy.Response
filePath string
return void
        private static void ConvertNancyResponseToResponse(Response nancyResponse, string filePath)
        {
            using (var output = new MemoryStream())
            {
                nancyResponse.Contents.Invoke(output);
                output.Flush();
                output.Position = 0;
                using (var reader = new StreamReader(output))
                {
                    File.WriteAllText(filePath, reader.ReadToEnd());
                }
            }
        }