Skip to content

Commit

Permalink
Minor comment cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
george-chakhidze committed Oct 21, 2023
1 parent f0d5d7f commit dd48095
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,12 @@ private void VisitRegistryValue(RegistryKey parent, string valueName)
var path = _currentPath;
var value = parent.GetValue(valueName)?.ToString();

#pragma warning disable IDE0057 // Substring can be simplified (.netstandard target does not contain Range operator support)
#pragma warning disable IDE0057 // Substring can be simplified (.NET Standard does not provide Range operator support)

// Special case: when writing (default) value, we dont want an empty string
// as value name appended to the key!
// Special case: when writing (default) value, we dont want an empty string as a value name appended to the key
if (string.IsNullOrWhiteSpace(valueName))
{
// Turns this: 'Key:SubKey:0:' into 'Key:SubKey:0', as this is what ASP.NET Core likes.
// Turns this: 'Key:SubKey:0:' into 'Key:SubKey:0', as this is what .NET likes
path = path.Substring(0, path.LastIndexOf(ConfigurationPath.KeyDelimiter, StringComparison.Ordinal));
}

Expand Down

0 comments on commit dd48095

Please sign in to comment.