Replace all Utils.IsNullOrEmpty(variable) with variable.IsNullOrEmpty()

This commit is contained in:
2dust
2025-03-05 19:44:49 +08:00
parent f3af831cf2
commit 71cc6d7a88
34 changed files with 153 additions and 162 deletions

View File

@@ -15,7 +15,7 @@ namespace ServiceLib.Common
{
regKey = Registry.CurrentUser.OpenSubKey(path, false);
var value = regKey?.GetValue(name) as string;
return Utils.IsNullOrEmpty(value) ? def : value;
return value.IsNullOrEmpty() ? def : value;
}
catch (Exception ex)
{
@@ -34,7 +34,7 @@ namespace ServiceLib.Common
try
{
regKey = Registry.CurrentUser.CreateSubKey(path);
if (Utils.IsNullOrEmpty(value.ToString()))
if (value.ToString().IsNullOrEmpty())
{
regKey?.DeleteValue(name, false);
}