1
0
mirror of https://github.com/bitwarden/server synced 2025-12-26 05:03:18 +00: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

@@ -17,9 +17,9 @@ namespace Bit.Admin.Models
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
if(Id != null)
if (Id != null)
{
if(Id.Length != 36 || (Id[0] != 'o' && Id[0] != 'u') ||
if (Id.Length != 36 || (Id[0] != 'o' && Id[0] != 'u') ||
!Guid.TryParse(Id.Substring(1, 32), out var guid))
{
yield return new ValidationResult("Customer Id is not a valid format.");

View File

@@ -52,7 +52,7 @@ namespace Bit.Admin.Models
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
if((!UserId.HasValue && !OrganizationId.HasValue) || (UserId.HasValue && OrganizationId.HasValue))
if ((!UserId.HasValue && !OrganizationId.HasValue) || (UserId.HasValue && OrganizationId.HasValue))
{
yield return new ValidationResult("Must provide either User Id, or Organization Id.");
}

View File

@@ -21,30 +21,30 @@ namespace Bit.Admin.Models
public string ExceptionToString(JObject e)
{
if(e == null)
if (e == null)
{
return null;
}
var val = string.Empty;
if(e["Message"] != null && e["Message"].ToObject<string>() != null)
if (e["Message"] != null && e["Message"].ToObject<string>() != null)
{
val += "Message:\n";
val += e["Message"] + "\n";
}
if(e["StackTrace"] != null && e["StackTrace"].ToObject<string>() != null)
if (e["StackTrace"] != null && e["StackTrace"].ToObject<string>() != null)
{
val += "\nStack Trace:\n";
val += e["StackTrace"];
}
else if(e["StackTraceString"] != null && e["StackTraceString"].ToObject<string>() != null)
else if (e["StackTraceString"] != null && e["StackTraceString"].ToObject<string>() != null)
{
val += "\nStack Trace String:\n";
val += e["StackTraceString"];
}
if(e["InnerException"] != null && e["InnerException"].ToObject<JObject>() != null)
if (e["InnerException"] != null && e["InnerException"].ToObject<JObject>() != null)
{
val += "\n\n=== Inner Exception ===\n\n";
val += ExceptionToString(e["InnerException"].ToObject<JObject>());