Skip to content

Commit

Permalink
Replaced hardcoded true/false with TrueString/FalseString (Azure#17359)
Browse files Browse the repository at this point in the history
  • Loading branch information
abatishchev authored and annelo-msft committed Feb 17, 2021
1 parent 7e94547 commit e37034f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/core/Azure.Core/src/DiagnosticsOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ public string? ApplicationId

private static bool? EnvironmentVariableToBool(string? value)
{
if (string.Equals("true", value, StringComparison.OrdinalIgnoreCase) ||
if (string.Equals(bool.TrueString, value, StringComparison.OrdinalIgnoreCase) ||
string.Equals("1", value, StringComparison.OrdinalIgnoreCase))
{
return true;
}

if (string.Equals("false", value, StringComparison.OrdinalIgnoreCase) ||
if (string.Equals(bool.FalseString, value, StringComparison.OrdinalIgnoreCase) ||
string.Equals("0", value, StringComparison.OrdinalIgnoreCase))
{
return false;
Expand Down

0 comments on commit e37034f

Please sign in to comment.