File tree Expand file tree Collapse file tree 2 files changed +3
-17
lines changed
Microsoft.Toolkit/Diagnostics Expand file tree Collapse file tree 2 files changed +3
-17
lines changed Original file line number Diff line number Diff line change 33// See the LICENSE file in the project root for more information.
44
55using System ;
6- #if NETSTANDARD2_1
76using System . Diagnostics . CodeAnalysis ;
8- #endif
97using System . Runtime . CompilerServices ;
108
119#nullable enable
@@ -39,11 +37,7 @@ public static void IsNullOrEmpty(string? text, string name)
3937 /// <param name="name">The name of the input parameter being tested.</param>
4038 /// <exception cref="ArgumentException">Thrown if <paramref name="text"/> is <see langword="null"/> or empty.</exception>
4139 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
42- public static void IsNotNullOrEmpty (
43- #if NETSTANDARD2_1
44- [ NotNull ]
45- #endif
46- string ? text , string name )
40+ public static void IsNotNullOrEmpty ( [ NotNull ] string ? text , string name )
4741 {
4842 if ( string . IsNullOrEmpty ( text ) )
4943 {
@@ -73,11 +67,7 @@ public static void IsNullOrWhitespace(string? text, string name)
7367 /// <param name="name">The name of the input parameter being tested.</param>
7468 /// <exception cref="ArgumentException">Thrown if <paramref name="text"/> is <see langword="null"/> or whitespace.</exception>
7569 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
76- public static void IsNotNullOrWhitespace (
77- #if NETSTANDARD2_1
78- [ NotNull ]
79- #endif
80- string ? text , string name )
70+ public static void IsNotNullOrWhitespace ( [ NotNull ] string ? text , string name )
8171 {
8272 if ( string . IsNullOrWhiteSpace ( text ) )
8373 {
Original file line number Diff line number Diff line change @@ -78,11 +78,7 @@ public static void IsNotNull<T>([NotNull] T? value, string name)
7878 /// <exception cref="ArgumentNullException">Thrown if <paramref name="value"/> is <see langword="null"/>.</exception>
7979 /// <remarks>The method is generic to avoid boxing the parameters, if they are value types.</remarks>
8080 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
81- public static void IsNotNull < T > (
82- #if NETSTANDARD2_1
83- [ NotNull ]
84- #endif
85- T ? value , string name )
81+ public static void IsNotNull < T > ( [ NotNull ] T ? value , string name )
8682 where T : struct
8783 {
8884 if ( value is null )
You can’t perform that action at this time.
0 commit comments