File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ public readonly struct OneOrMany<T>
2323 /// <param name="item">The single item value.</param>
2424 public OneOrMany ( T item )
2525 {
26+ #pragma warning disable CA1508 // TODO: Remove this suppression in .NET 6 where the warning is fixed.
2627 if ( item is null || ( item is string itemAsString && string . IsNullOrWhiteSpace ( itemAsString ) ) )
28+ #pragma warning restore CA1508 // TODO: Remove this suppression in .NET 6 where the warning is fixed.
2729 {
2830 this . collection = null ;
2931 this . HasOne = false ;
@@ -51,7 +53,9 @@ public OneOrMany(ReadOnlySpan<T> span)
5153 for ( var i = 0 ; i < span . Length ; i ++ )
5254 {
5355 var item = span [ i ] ;
56+ #pragma warning disable CA1508 // TODO: Remove this suppression in .NET 6 where the warning is fixed.
5457 if ( ! string . IsNullOrWhiteSpace ( item as string ) )
58+ #pragma warning restore CA1508 // TODO: Remove this suppression in .NET 6 where the warning is fixed.
5559 {
5660 items [ index ] = item ;
5761 index ++ ;
@@ -63,7 +67,9 @@ public OneOrMany(ReadOnlySpan<T> span)
6367 for ( var i = 0 ; i < span . Length ; i ++ )
6468 {
6569 var item = span [ i ] ;
70+ #pragma warning disable CA1508 // TODO: Remove this suppression in .NET 6 where the warning is fixed.
6671 if ( item is not null )
72+ #pragma warning restore CA1508 // TODO: Remove this suppression in .NET 6 where the warning is fixed.
6773 {
6874 items [ index ] = item ;
6975 index ++ ;
You can’t perform that action at this time.
0 commit comments