Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Register virtual methods for interfaces implemented on base classes, …

…not just the current one
  • Loading branch information...
commit 2bb3289c94936d7733e0d3f28eb36d3adb108281 1 parent 06771e8
@flaub authored
Showing with 10 additions and 4 deletions.
  1. +10 −4 src/DotWeb.Utility/Cecil/TypeSystem.cs
View
14 src/DotWeb.Utility/Cecil/TypeSystem.cs
@@ -165,9 +165,19 @@ public static class Names
ProcessMethodOverrides(virtuals, baseDef);
+ ProcessInterfaces(virtuals, baseDef);
+
baseType = baseDef.BaseType;
}
+ ProcessInterfaces(virtuals, typeDef);
+
+ foreach (TypeDefinition nested in typeDef.NestedTypes) {
+ ProcessType(nested);
+ }
+ }
+
+ private void ProcessInterfaces(VirtualsDictionary virtuals, TypeDefinition typeDef) {
foreach (TypeReference iface in typeDef.Interfaces) {
var ifaceDef = iface.Resolve();
var ifaceSet = GetSubclasses(ifaceDef);
@@ -175,10 +185,6 @@ public static class Names
ProcessMethodOverrides(virtuals, ifaceDef);
}
-
- foreach (TypeDefinition nested in typeDef.NestedTypes) {
- ProcessType(nested);
- }
}
public TypeDefinition GetTypeDefinition(string typeName) {
Please sign in to comment.
Something went wrong with that request. Please try again.