mirror of
https://github.com/bitwarden/mobile
synced 2025-12-23 11:43:49 +00:00
Changed all C# control flow block statements to include space between keyword and open paren (#800)
This commit is contained in:
@@ -25,7 +25,7 @@ namespace Bit.Core.Models.View
|
||||
{
|
||||
get
|
||||
{
|
||||
if(!string.IsNullOrWhiteSpace(Size) && long.TryParse(Size, out var s))
|
||||
if (!string.IsNullOrWhiteSpace(Size) && long.TryParse(Size, out var s))
|
||||
{
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -43,12 +43,12 @@ namespace Bit.Core.Models.View
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_subTitle == null)
|
||||
if (_subTitle == null)
|
||||
{
|
||||
_subTitle = Brand;
|
||||
if(Number != null && Number.Length >= 4)
|
||||
if (Number != null && Number.Length >= 4)
|
||||
{
|
||||
if(!string.IsNullOrWhiteSpace(_subTitle))
|
||||
if (!string.IsNullOrWhiteSpace(_subTitle))
|
||||
{
|
||||
_subTitle += ", ";
|
||||
}
|
||||
@@ -71,7 +71,7 @@ namespace Bit.Core.Models.View
|
||||
{
|
||||
var expMonthNull = string.IsNullOrWhiteSpace(ExpMonth);
|
||||
var expYearNull = string.IsNullOrWhiteSpace(ExpYear);
|
||||
if(expMonthNull && expYearNull)
|
||||
if (expMonthNull && expYearNull)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Bit.Core.Models.View
|
||||
{
|
||||
get
|
||||
{
|
||||
switch(Type)
|
||||
switch (Type)
|
||||
{
|
||||
case CipherType.Login:
|
||||
return Login.SubTitle;
|
||||
@@ -73,7 +73,7 @@ namespace Bit.Core.Models.View
|
||||
{
|
||||
get
|
||||
{
|
||||
if(HasAttachments)
|
||||
if (HasAttachments)
|
||||
{
|
||||
return Attachments.Any(a => a.Key == null);
|
||||
}
|
||||
@@ -85,11 +85,11 @@ namespace Bit.Core.Models.View
|
||||
{
|
||||
get
|
||||
{
|
||||
if(Type != CipherType.Login || Login == null)
|
||||
if (Type != CipherType.Login || Login == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else if(string.IsNullOrWhiteSpace(Login.Password))
|
||||
else if (string.IsNullOrWhiteSpace(Login.Password))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -51,16 +51,16 @@ namespace Bit.Core.Models.View
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_subTitle == null && (FirstName != null || LastName != null))
|
||||
if (_subTitle == null && (FirstName != null || LastName != null))
|
||||
{
|
||||
_subTitle = string.Empty;
|
||||
if(FirstName != null)
|
||||
if (FirstName != null)
|
||||
{
|
||||
_subTitle = FirstName;
|
||||
}
|
||||
if(LastName != null)
|
||||
if (LastName != null)
|
||||
{
|
||||
if(_subTitle != string.Empty)
|
||||
if (_subTitle != string.Empty)
|
||||
{
|
||||
_subTitle += " ";
|
||||
}
|
||||
@@ -75,23 +75,23 @@ namespace Bit.Core.Models.View
|
||||
{
|
||||
get
|
||||
{
|
||||
if(!string.IsNullOrWhiteSpace(Title) || !string.IsNullOrWhiteSpace(FirstName) ||
|
||||
if (!string.IsNullOrWhiteSpace(Title) || !string.IsNullOrWhiteSpace(FirstName) ||
|
||||
!string.IsNullOrWhiteSpace(MiddleName) || !string.IsNullOrWhiteSpace(LastName))
|
||||
{
|
||||
var name = string.Empty;
|
||||
if(!string.IsNullOrWhiteSpace(Title))
|
||||
if (!string.IsNullOrWhiteSpace(Title))
|
||||
{
|
||||
name = string.Concat(name, Title, " ");
|
||||
}
|
||||
if(!string.IsNullOrWhiteSpace(FirstName))
|
||||
if (!string.IsNullOrWhiteSpace(FirstName))
|
||||
{
|
||||
name = string.Concat(name, FirstName, " ");
|
||||
}
|
||||
if(!string.IsNullOrWhiteSpace(MiddleName))
|
||||
if (!string.IsNullOrWhiteSpace(MiddleName))
|
||||
{
|
||||
name = string.Concat(name, MiddleName, " ");
|
||||
}
|
||||
if(!string.IsNullOrWhiteSpace(LastName))
|
||||
if (!string.IsNullOrWhiteSpace(LastName))
|
||||
{
|
||||
name = string.Concat(name, LastName);
|
||||
}
|
||||
@@ -106,17 +106,17 @@ namespace Bit.Core.Models.View
|
||||
get
|
||||
{
|
||||
var address = Address1;
|
||||
if(!string.IsNullOrWhiteSpace(Address2))
|
||||
if (!string.IsNullOrWhiteSpace(Address2))
|
||||
{
|
||||
if(!string.IsNullOrWhiteSpace(address))
|
||||
if (!string.IsNullOrWhiteSpace(address))
|
||||
{
|
||||
address += ", ";
|
||||
}
|
||||
address += Address2;
|
||||
}
|
||||
if(!string.IsNullOrWhiteSpace(Address3))
|
||||
if (!string.IsNullOrWhiteSpace(Address3))
|
||||
{
|
||||
if(!string.IsNullOrWhiteSpace(address))
|
||||
if (!string.IsNullOrWhiteSpace(address))
|
||||
{
|
||||
address += ", ";
|
||||
}
|
||||
@@ -130,7 +130,7 @@ namespace Bit.Core.Models.View
|
||||
{
|
||||
get
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(City) && string.IsNullOrWhiteSpace(State) &&
|
||||
if (string.IsNullOrWhiteSpace(City) && string.IsNullOrWhiteSpace(State) &&
|
||||
string.IsNullOrWhiteSpace(PostalCode))
|
||||
{
|
||||
return null;
|
||||
|
||||
@@ -51,10 +51,10 @@ namespace Bit.Core.Models.View
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_domain == null && Uri != null)
|
||||
if (_domain == null && Uri != null)
|
||||
{
|
||||
_domain = CoreHelpers.GetDomain(Uri);
|
||||
if(_domain == string.Empty)
|
||||
if (_domain == string.Empty)
|
||||
{
|
||||
_domain = null;
|
||||
}
|
||||
@@ -67,10 +67,10 @@ namespace Bit.Core.Models.View
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_hostname == null && Uri != null)
|
||||
if (_hostname == null && Uri != null)
|
||||
{
|
||||
_hostname = CoreHelpers.GetHostname(Uri);
|
||||
if(_hostname == string.Empty)
|
||||
if (_hostname == string.Empty)
|
||||
{
|
||||
_hostname = null;
|
||||
}
|
||||
@@ -88,11 +88,11 @@ namespace Bit.Core.Models.View
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_canLaunch != null)
|
||||
if (_canLaunch != null)
|
||||
{
|
||||
return _canLaunch.Value;
|
||||
}
|
||||
if(Uri != null && Match != UriMatchType.RegularExpression)
|
||||
if (Uri != null && Match != UriMatchType.RegularExpression)
|
||||
{
|
||||
var uri = LaunchUri;
|
||||
_canLaunch = _canLaunchWhitelist.Any(prefix => uri.StartsWith(prefix));
|
||||
|
||||
Reference in New Issue
Block a user