@@ -411,13 +411,13 @@ public ulong GetMinimumBoundedRectangleCount(uint fragmentIndex)
411411 DataType dataType = GetDimensionType ( fragmentIndex , dimensionIndex ) ;
412412 if ( RuntimeHelpers . IsReferenceOrContainsReferences < T > ( ) )
413413 {
414- if ( typeof ( T ) == typeof ( string ) )
414+ if ( typeof ( T ) == typeof ( string ) && EnumUtil . IsStringType ( dataType ) )
415415 {
416416 ( string startStr , string endStr ) =
417417 GetStringMinimumBoundedRectangle ( fragmentIndex , minimumBoundedRectangleIndex , dimensionIndex , dataType ) ;
418418 return ( ( T ) ( object ) startStr , ( T ) ( object ) endStr ) ;
419419 }
420- ThrowHelpers . ThrowTypeNotSupported ( ) ;
420+ ThrowHelpers . ThrowTypeMismatch ( dataType ) ;
421421 return default ;
422422 }
423423 ValidateDomainType < T > ( dataType ) ;
@@ -450,13 +450,13 @@ public ulong GetMinimumBoundedRectangleCount(uint fragmentIndex)
450450 DataType dataType = GetDimensionType ( fragmentIndex , dimensionName ) ;
451451 if ( RuntimeHelpers . IsReferenceOrContainsReferences < T > ( ) )
452452 {
453- if ( typeof ( T ) == typeof ( string ) )
453+ if ( typeof ( T ) == typeof ( string ) && EnumUtil . IsStringType ( dataType ) )
454454 {
455455 ( string startStr , string endStr ) =
456456 GetStringMinimumBoundedRectangle ( fragmentIndex , minimumBoundedRectangleIndex , dimensionName , dataType ) ;
457457 return ( ( T ) ( object ) startStr , ( T ) ( object ) endStr ) ;
458458 }
459- ThrowHelpers . ThrowTypeNotSupported ( ) ;
459+ ThrowHelpers . ThrowTypeMismatch ( dataType ) ;
460460 return default ;
461461 }
462462 ValidateDomainType < T > ( dataType ) ;
@@ -536,12 +536,12 @@ public ulong GetMinimumBoundedRectangleCount(uint fragmentIndex)
536536 DataType dataType = GetDimensionType ( fragmentIndex , dimensionIndex ) ;
537537 if ( RuntimeHelpers . IsReferenceOrContainsReferences < T > ( ) )
538538 {
539- if ( typeof ( T ) == typeof ( string ) )
539+ if ( typeof ( T ) == typeof ( string ) && EnumUtil . IsStringType ( dataType ) )
540540 {
541541 ( string startStr , string endStr ) = GetStringNonEmptyDomain ( fragmentIndex , dimensionIndex , dataType ) ;
542542 return ( ( T ) ( object ) startStr , ( T ) ( object ) endStr ) ;
543543 }
544- ThrowHelpers . ThrowTypeNotSupported ( ) ;
544+ ThrowHelpers . ThrowTypeMismatch ( dataType ) ;
545545 return default ;
546546 }
547547 ValidateDomainType < T > ( dataType ) ;
@@ -574,12 +574,12 @@ public ulong GetMinimumBoundedRectangleCount(uint fragmentIndex)
574574 DataType dataType = GetDimensionType ( fragmentIndex , dimensionName ) ;
575575 if ( RuntimeHelpers . IsReferenceOrContainsReferences < T > ( ) )
576576 {
577- if ( typeof ( T ) == typeof ( string ) )
577+ if ( typeof ( T ) == typeof ( string ) && EnumUtil . IsStringType ( dataType ) )
578578 {
579579 ( string startStr , string endStr ) = GetStringNonEmptyDomain ( fragmentIndex , dimensionName , dataType ) ;
580580 return ( ( T ) ( object ) startStr , ( T ) ( object ) endStr ) ;
581581 }
582- ThrowHelpers . ThrowTypeNotSupported ( ) ;
582+ ThrowHelpers . ThrowTypeMismatch ( dataType ) ;
583583 return default ;
584584 }
585585 ValidateDomainType < T > ( dataType ) ;
0 commit comments