1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-15 14:47:45 -05:00

Changed all C# control flow block statements to include space between keyword and open paren

This commit is contained in:
Chad Scharf
2020-03-27 14:36:37 -04:00
parent 943aea9a12
commit 9800b752c0
243 changed files with 2258 additions and 2258 deletions

View File

@ -10,15 +10,15 @@ namespace Bit.Api.Utilities
public async static Task<T> ReadJsonFileFromBody<T>(HttpContext httpContext, IFormFile file, long maxSize = 51200)
{
T obj = default(T);
if(file != null && httpContext.Request.ContentLength.HasValue && httpContext.Request.ContentLength.Value <= maxSize)
if (file != null && httpContext.Request.ContentLength.HasValue && httpContext.Request.ContentLength.Value <= maxSize)
{
try
{
using(var stream = file.OpenReadStream())
using(var reader = new StreamReader(stream))
using (var stream = file.OpenReadStream())
using (var reader = new StreamReader(stream))
{
var s = await reader.ReadToEndAsync();
if(!string.IsNullOrWhiteSpace(s))
if (!string.IsNullOrWhiteSpace(s))
{
obj = JsonConvert.DeserializeObject<T>(s);
}