1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-06 02:22:49 -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

@ -44,7 +44,7 @@ namespace Bit.Core.Models.Data
var result = base.WriteEntity(operationContext);
var typeName = nameof(Type);
if(result.ContainsKey(typeName))
if (result.ContainsKey(typeName))
{
result[typeName] = new EntityProperty((int)Type);
}
@ -54,7 +54,7 @@ namespace Bit.Core.Models.Data
}
var deviceTypeName = nameof(DeviceType);
if(result.ContainsKey(deviceTypeName))
if (result.ContainsKey(deviceTypeName))
{
result[deviceTypeName] = new EntityProperty((int?)DeviceType);
}
@ -72,13 +72,13 @@ namespace Bit.Core.Models.Data
base.ReadEntity(properties, operationContext);
var typeName = nameof(Type);
if(properties.ContainsKey(typeName) && properties[typeName].Int32Value.HasValue)
if (properties.ContainsKey(typeName) && properties[typeName].Int32Value.HasValue)
{
Type = (EventType)properties[typeName].Int32Value.Value;
}
var deviceTypeName = nameof(DeviceType);
if(properties.ContainsKey(deviceTypeName) && properties[deviceTypeName].Int32Value.HasValue)
if (properties.ContainsKey(deviceTypeName) && properties[deviceTypeName].Int32Value.HasValue)
{
DeviceType = (DeviceType)properties[deviceTypeName].Int32Value.Value;
}
@ -99,7 +99,7 @@ namespace Bit.Core.Models.Data
}
};
if(e.OrganizationId.HasValue && e.ActingUserId.HasValue)
if (e.OrganizationId.HasValue && e.ActingUserId.HasValue)
{
entities.Add(new EventTableEntity(e)
{
@ -109,7 +109,7 @@ namespace Bit.Core.Models.Data
});
}
if(e.CipherId.HasValue)
if (e.CipherId.HasValue)
{
entities.Add(new EventTableEntity(e)
{

View File

@ -16,11 +16,11 @@ namespace Bit.Core.Models.Data
public InstallationDeviceEntity(string prefixedDeviceId)
{
var parts = prefixedDeviceId.Split("_");
if(parts.Length < 2)
if (parts.Length < 2)
{
throw new ArgumentException("Not enough parts.");
}
if(!Guid.TryParse(parts[0], out var installationId) || !Guid.TryParse(parts[1], out var deviceId))
if (!Guid.TryParse(parts[0], out var installationId) || !Guid.TryParse(parts[1], out var deviceId))
{
throw new ArgumentException("Could not parse parts.");
}

View File

@ -23,14 +23,14 @@ namespace Bit.Core.Models.Data
public Dictionary<TwoFactorProviderType, TwoFactorProvider> GetTwoFactorProviders()
{
if(string.IsNullOrWhiteSpace(TwoFactorProviders))
if (string.IsNullOrWhiteSpace(TwoFactorProviders))
{
return null;
}
try
{
if(_twoFactorProviders == null)
if (_twoFactorProviders == null)
{
_twoFactorProviders =
JsonConvert.DeserializeObject<Dictionary<TwoFactorProviderType, TwoFactorProvider>>(
@ -39,7 +39,7 @@ namespace Bit.Core.Models.Data
return _twoFactorProviders;
}
catch(JsonSerializationException)
catch (JsonSerializationException)
{
return null;
}