@@ -439,30 +439,29 @@ private static bool IsCollectionContentEmptyOrSpaces(string bracketLiteralText)
439
439
return true ;
440
440
}
441
441
442
- bool onlyEmptyOrSpaces = true ;
443
- bool insideQuotes = false ;
442
+ bool isEmptyOrHasOnlySpaces = true ;
443
+ bool isCharinsideQuotes = false ;
444
444
char quoteChar = '\0 ' ;
445
- List < string > items = new ( ) ;
446
445
Span < char > buffer = stackalloc char [ content . Length ] ;
447
446
int bufferIndex = 0 ;
448
447
449
448
for ( int i = 0 ; i < content . Length ; i ++ )
450
449
{
451
450
char c = content [ i ] ;
452
451
453
- if ( insideQuotes )
452
+ if ( isCharinsideQuotes )
454
453
{
455
454
if ( c == quoteChar )
456
455
{
457
- insideQuotes = false ;
456
+ isCharinsideQuotes = false ;
458
457
}
459
458
buffer [ bufferIndex ++ ] = c ;
460
459
}
461
460
else
462
461
{
463
462
if ( c == '"' || c == '\' ' )
464
463
{
465
- insideQuotes = true ;
464
+ isCharinsideQuotes = true ;
466
465
quoteChar = c ;
467
466
buffer [ bufferIndex ++ ] = c ;
468
467
}
@@ -472,7 +471,7 @@ private static bool IsCollectionContentEmptyOrSpaces(string bracketLiteralText)
472
471
473
472
if ( ! string . IsNullOrWhiteSpace ( item ) )
474
473
{
475
- onlyEmptyOrSpaces = false ;
474
+ isEmptyOrHasOnlySpaces = false ;
476
475
break ;
477
476
}
478
477
bufferIndex = 0 ;
@@ -490,11 +489,11 @@ private static bool IsCollectionContentEmptyOrSpaces(string bracketLiteralText)
490
489
491
490
if ( ! string . IsNullOrWhiteSpace ( lastItem ) )
492
491
{
493
- onlyEmptyOrSpaces = false ;
492
+ isEmptyOrHasOnlySpaces = false ;
494
493
}
495
494
}
496
495
497
- return onlyEmptyOrSpaces ;
496
+ return isEmptyOrHasOnlySpaces ;
498
497
}
499
498
}
500
499
}
0 commit comments