Clean up extension methods (#17051)
Co-authored-by: Andy Butland <abutland73@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user