Cleanup netcore21 specific code

This commit is contained in:
nicolas.dorier
2020-01-12 13:30:54 +09:00
parent 9876208b7d
commit 629dfcf152
24 changed files with 9 additions and 144 deletions

View File

@@ -47,11 +47,7 @@ namespace BTCPayServer.Models
}
context.HttpContext.Response.Headers.Add("Content-Type", new Microsoft.Extensions.Primitives.StringValues("application/json"));
var str = JsonConvert.SerializeObject(jobj);
#if NETCOREAPP21
using (var writer = new StreamWriter(context.HttpContext.Response.Body, new UTF8Encoding(false), 1024 * 10, true))
#else
await using (var writer = new StreamWriter(context.HttpContext.Response.Body, new UTF8Encoding(false), 1024 * 10, true))
#endif
{
await writer.WriteAsync(str);
}