@@ -101,6 +101,8 @@ public bool CompareTypeMetadata(
101
101
continue ;
102
102
}
103
103
104
+ oldPropertyType = oldTypeMetadata . GetClassNameWithoutApiVersion ( oldPropertyType ) ;
105
+ newPropertyType = newTypeMetadata . GetClassNameWithoutApiVersion ( newPropertyType ) ;
104
106
// If the types are the same, compare their properties
105
107
if ( oldPropertyType . Equals ( newPropertyType , StringComparison . OrdinalIgnoreCase ) )
106
108
{
@@ -237,7 +239,9 @@ public void CheckParameterType(
237
239
}
238
240
239
241
// If the types are different, log an issue
240
- if ( ! oldTypeMetadata . Name . Equals ( newTypeMetadata . Name , StringComparison . OrdinalIgnoreCase ) )
242
+ string oldTypeName = oldTypeMetadata . GetClassNameWithoutApiVersion ( oldTypeMetadata . Name ) ;
243
+ string newTypeName = newTypeMetadata . GetClassNameWithoutApiVersion ( newTypeMetadata . Name ) ;
244
+ if ( ! oldTypeName . Equals ( newTypeName , StringComparison . OrdinalIgnoreCase ) )
241
245
{
242
246
issueLogger ? . LogBreakingChangeIssue (
243
247
cmdlet : cmdlet ,
@@ -313,8 +317,10 @@ private bool IsElementType(
313
317
// Check if the type is an array
314
318
if ( oldTypeMetadata . ElementType != null && newTypeMetadata . ElementType != null )
315
319
{
320
+ string oldTypeName = oldTypeMetadata . GetClassNameWithoutApiVersion ( oldTypeMetadata . ElementType ) ;
321
+ string newTypeName = newTypeMetadata . GetClassNameWithoutApiVersion ( newTypeMetadata . ElementType ) ;
316
322
// Check if the element of the array is the same in the old and new metadata
317
- if ( oldTypeMetadata . ElementType . Equals ( newTypeMetadata . ElementType , StringComparison . OrdinalIgnoreCase ) )
323
+ if ( oldTypeName . Equals ( newTypeName , StringComparison . OrdinalIgnoreCase ) )
318
324
{
319
325
// If we have not previously seen this element type,
320
326
// run this method on the type
@@ -431,7 +437,9 @@ private bool HasSameGenericType(
431
437
ReportLogger < BreakingChangeIssue > issueLogger )
432
438
{
433
439
// If the type of the generics are the same, return true
434
- if ( oldTypeMetadata . Name . Equals ( newTypeMetadata . Name , StringComparison . OrdinalIgnoreCase ) )
440
+ string oldTypeName = oldTypeMetadata . GetClassNameWithoutApiVersion ( oldTypeMetadata . Name ) ;
441
+ string newTypeName = newTypeMetadata . GetClassNameWithoutApiVersion ( newTypeMetadata . Name ) ;
442
+ if ( oldTypeName . Equals ( newTypeName , StringComparison . OrdinalIgnoreCase ) )
435
443
{
436
444
return true ;
437
445
}
0 commit comments