@@ -699,7 +699,7 @@ internal abstract class ValuePairInterleavedProcessorBase<T> : ResultProcessor<T
699699 // happened, and we need to handle that; thus, by default, we'll detect jagged data
700700 // and handle it automatically; this virtual is included so we can turn it off
701701 // on a per-processor basis if needed
702- protected virtual bool AllowJaggedPairs => true ;
702+ protected virtual bool AllowJaggedPairs ( in RawResult result ) => result . IsResp3 ;
703703
704704 public bool TryParse ( in RawResult result , out T [ ] ? pairs )
705705 => TryParse ( result , out pairs , false , out _ ) ;
@@ -719,7 +719,7 @@ public bool TryParse(in RawResult result, out T[]? pairs)
719719 return [ ] ;
720720 }
721721
722- bool interleaved = ! ( result . IsResp3 && AllowJaggedPairs && IsAllJaggedPairs ( arr ) ) ;
722+ bool interleaved = ! ( AllowJaggedPairs ( result ) && IsAllJaggedPairs ( arr ) ) ;
723723 if ( interleaved ) count >>= 1 ; // so: half of that
724724 var pairs = allowOversized ? ArrayPool < T > . Shared . Rent ( count ) : new T [ count ] ;
725725
@@ -2287,7 +2287,7 @@ protected override bool SetResultCore(PhysicalConnection connection, Message mes
22872287
22882288 private sealed class RedisStreamInterleavedProcessor : ValuePairInterleavedProcessorBase < RedisStream >
22892289 {
2290- protected override bool AllowJaggedPairs => false ; // we only use this on a flattened map
2290+ protected override bool AllowJaggedPairs ( in RawResult result ) => false ; // we only use this on a flattened map
22912291
22922292 public static readonly RedisStreamInterleavedProcessor Instance = new ( ) ;
22932293 private RedisStreamInterleavedProcessor ( )
0 commit comments