@@ -39,7 +39,7 @@ private static void Execute(ImmutableArray<MockClass> mocksToGenerate, SourcePro
3939 ( string Name , MockClass MockClass ) [ ] namedMocksToGenerate = CreateNames ( mocksToGenerate ) ;
4040
4141 // Track which additional implementations have been generated for each base type to avoid duplicates
42- Dictionary < ( string ? Namespace , string ClassName ) , HashSet < ( string ? Namespace , string ClassName ) > > generatedAdditionalImplementations = new ( ) ;
42+ Dictionary < ( string ? Namespace , string ClassName ) , HashSet < ( string ? Namespace , string ClassName ) > > generatedInterfacesByBaseType = new ( ) ;
4343
4444 // Sort by number of additional implementations (ascending) to generate simpler combinations first
4545 ( string Name , MockClass MockClass ) [ ] sortedMocks = namedMocksToGenerate
@@ -59,15 +59,15 @@ private static void Execute(ImmutableArray<MockClass> mocksToGenerate, SourcePro
5959 {
6060 ( string ? Namespace , string ClassName ) baseTypeKey = ( mockToGenerate . MockClass . Namespace , mockToGenerate . MockClass . ClassName ) ;
6161
62- if ( ! generatedAdditionalImplementations . TryGetValue ( baseTypeKey , out HashSet < ( string ? Namespace , string ClassName ) > ? generatedForThisBase ) )
62+ if ( ! generatedInterfacesByBaseType . TryGetValue ( baseTypeKey , out HashSet < ( string ? Namespace , string ClassName ) > ? generatedInterfaces ) )
6363 {
64- generatedForThisBase = new HashSet < ( string ? Namespace , string ClassName ) > ( ) ;
65- generatedAdditionalImplementations [ baseTypeKey ] = generatedForThisBase ;
64+ generatedInterfaces = new HashSet < ( string ? Namespace , string ClassName ) > ( ) ;
65+ generatedInterfacesByBaseType [ baseTypeKey ] = generatedInterfaces ;
6666 }
6767
6868 // Filter out interfaces that have already been generated for this base type
6969 Class [ ] interfacesToGenerate = mockToGenerate . MockClass . DistinctAdditionalImplementations ( )
70- . Where ( impl => generatedForThisBase . Add ( ( impl . Namespace , impl . ClassName ) ) )
70+ . Where ( impl => generatedInterfaces . Add ( ( impl . Namespace , impl . ClassName ) ) )
7171 . ToArray ( ) ;
7272
7373 if ( interfacesToGenerate . Length > 0 )
0 commit comments