mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-10 03:05:42 +00:00
(#42) Use NRT for AddNullIf__
This commit is contained in:
parent
14b43adf82
commit
92d60a6db8
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@ -18,7 +18,7 @@ namespace X10D
|
||||
/// <see langword="null" /> if <paramref name="value" /> is <see langword="null" /> or equal to
|
||||
/// <see cref="string.Empty" />, or <paramref name="value" /> otherwise.
|
||||
/// </returns>
|
||||
public static string? AsNullIfEmpty(this string value)
|
||||
public static string? AsNullIfEmpty(this string? value)
|
||||
{
|
||||
return string.IsNullOrEmpty(value) ? null : value;
|
||||
}
|
||||
@ -32,7 +32,7 @@ namespace X10D
|
||||
/// <see langword="null" /> if <paramref name="value" /> is <see langword="null" /> or equal to
|
||||
/// <see cref="string.Empty" /> or is composed of only whitespace characters, or <paramref name="value" /> otherwise.
|
||||
/// </returns>
|
||||
public static string? AsNullIfWhiteSpace(this string value)
|
||||
public static string? AsNullIfWhiteSpace(this string? value)
|
||||
{
|
||||
return string.IsNullOrWhiteSpace(value) ? null : value;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user