@@ -411,13 +411,13 @@ public ulong GetMinimumBoundedRectangleCount(uint fragmentIndex)
411
411
DataType dataType = GetDimensionType ( fragmentIndex , dimensionIndex ) ;
412
412
if ( RuntimeHelpers . IsReferenceOrContainsReferences < T > ( ) )
413
413
{
414
- if ( typeof ( T ) == typeof ( string ) )
414
+ if ( typeof ( T ) == typeof ( string ) && EnumUtil . IsStringType ( dataType ) )
415
415
{
416
416
( string startStr , string endStr ) =
417
417
GetStringMinimumBoundedRectangle ( fragmentIndex , minimumBoundedRectangleIndex , dimensionIndex , dataType ) ;
418
418
return ( ( T ) ( object ) startStr , ( T ) ( object ) endStr ) ;
419
419
}
420
- ThrowHelpers . ThrowTypeNotSupported ( ) ;
420
+ ThrowHelpers . ThrowTypeMismatch ( dataType ) ;
421
421
return default ;
422
422
}
423
423
ValidateDomainType < T > ( dataType ) ;
@@ -450,13 +450,13 @@ public ulong GetMinimumBoundedRectangleCount(uint fragmentIndex)
450
450
DataType dataType = GetDimensionType ( fragmentIndex , dimensionName ) ;
451
451
if ( RuntimeHelpers . IsReferenceOrContainsReferences < T > ( ) )
452
452
{
453
- if ( typeof ( T ) == typeof ( string ) )
453
+ if ( typeof ( T ) == typeof ( string ) && EnumUtil . IsStringType ( dataType ) )
454
454
{
455
455
( string startStr , string endStr ) =
456
456
GetStringMinimumBoundedRectangle ( fragmentIndex , minimumBoundedRectangleIndex , dimensionName , dataType ) ;
457
457
return ( ( T ) ( object ) startStr , ( T ) ( object ) endStr ) ;
458
458
}
459
- ThrowHelpers . ThrowTypeNotSupported ( ) ;
459
+ ThrowHelpers . ThrowTypeMismatch ( dataType ) ;
460
460
return default ;
461
461
}
462
462
ValidateDomainType < T > ( dataType ) ;
@@ -536,12 +536,12 @@ public ulong GetMinimumBoundedRectangleCount(uint fragmentIndex)
536
536
DataType dataType = GetDimensionType ( fragmentIndex , dimensionIndex ) ;
537
537
if ( RuntimeHelpers . IsReferenceOrContainsReferences < T > ( ) )
538
538
{
539
- if ( typeof ( T ) == typeof ( string ) )
539
+ if ( typeof ( T ) == typeof ( string ) && EnumUtil . IsStringType ( dataType ) )
540
540
{
541
541
( string startStr , string endStr ) = GetStringNonEmptyDomain ( fragmentIndex , dimensionIndex , dataType ) ;
542
542
return ( ( T ) ( object ) startStr , ( T ) ( object ) endStr ) ;
543
543
}
544
- ThrowHelpers . ThrowTypeNotSupported ( ) ;
544
+ ThrowHelpers . ThrowTypeMismatch ( dataType ) ;
545
545
return default ;
546
546
}
547
547
ValidateDomainType < T > ( dataType ) ;
@@ -574,12 +574,12 @@ public ulong GetMinimumBoundedRectangleCount(uint fragmentIndex)
574
574
DataType dataType = GetDimensionType ( fragmentIndex , dimensionName ) ;
575
575
if ( RuntimeHelpers . IsReferenceOrContainsReferences < T > ( ) )
576
576
{
577
- if ( typeof ( T ) == typeof ( string ) )
577
+ if ( typeof ( T ) == typeof ( string ) && EnumUtil . IsStringType ( dataType ) )
578
578
{
579
579
( string startStr , string endStr ) = GetStringNonEmptyDomain ( fragmentIndex , dimensionName , dataType ) ;
580
580
return ( ( T ) ( object ) startStr , ( T ) ( object ) endStr ) ;
581
581
}
582
- ThrowHelpers . ThrowTypeNotSupported ( ) ;
582
+ ThrowHelpers . ThrowTypeMismatch ( dataType ) ;
583
583
return default ;
584
584
}
585
585
ValidateDomainType < T > ( dataType ) ;
0 commit comments