Clean up extension methods (#17051)

Co-authored-by: Andy Butland <abutland73@gmail.com>
This commit is contained in:
Ronald Barendse
2025-05-05 14:53:26 +02:00
committed by GitHub
parent 44d9f5ac2e
commit 2dced37117
28 changed files with 187 additions and 1157 deletions

View File

@@ -912,7 +912,8 @@ public static class StringExtensions
return text;
}
public static string OrIfNullOrWhiteSpace(this string input, string alternative) =>
[return: NotNullIfNotNull(nameof(alternative))]
public static string? OrIfNullOrWhiteSpace(this string? input, string? alternative) =>
!string.IsNullOrWhiteSpace(input)
? input
: alternative;