Skip to content

Commit 50a830c

Browse files
committed
Remove obsolete explicit interface implementation checks
Removed commented-out code for handling explicit interface implementations declared directly on interfaces. The method now skips this check and iterates over implemented interfaces.
1 parent 51fcf26 commit 50a830c

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

‎src/BionicCode.Utilities.Reflection/MethodData.cs‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,27 +1491,6 @@ private static bool TryGetExplicitInterfaceImplementationInfo(MethodData methodD
14911491
interfaceDeclaration = null;
14921492

14931493
return false;
1494-
//interfaceDeclaration = methodData;
1495-
//TypeData interfaceTypeData = methodData.DeclaringTypeData;
1496-
//Type interfaceType = methodData.DeclaringTypeData.UnwrapType();
1497-
1498-
//// If the declaring type is an interface, check if the method is declared on that interface.
1499-
//// This covers the case of explicit interface implementations declared directly on interfaces.
1500-
//InterfaceMapping interfaceMapping = interfaceType.GetInterfaceMap(interfaceType);
1501-
//for (int i = 0; i < interfaceMapping.TargetMethods.Length; i++)
1502-
//{
1503-
// var implementationMethodData = interfaceMapping.TargetMethods[i].ToMethodData();
1504-
// if (implementationMethodData.EqualsBySignature(interfaceDeclaration))
1505-
// {
1506-
// // The method is an explicit interface implementation declared directly on the interface.
1507-
// declaringInterfaceTypeData = interfaceTypeData;
1508-
// implementingTypeData = implementationMethodData.DeclaringTypeData;
1509-
1510-
// return true;
1511-
// }
1512-
//}
1513-
1514-
//// If the declaring type is an interface, we must continue to check all inherited interfaces for explicit interface implementations declared on those interfaces.
15151494
}
15161495

15171496
TypeList implementedInterfaces = declaringTypeData.InterfacesData;

0 commit comments

Comments
 (0)