Browse Source

Add support for shadowing events.

pull/138/head
Ed Harvey 14 years ago
parent
commit
7f5b04d8e0
  1. 6
      ICSharpCode.Decompiler/Ast/AstBuilder.cs

6
ICSharpCode.Decompiler/Ast/AstBuilder.cs

@ -880,8 +880,12 @@ namespace ICSharpCode.Decompiler.Ast @@ -880,8 +880,12 @@ namespace ICSharpCode.Decompiler.Ast
astEvent.RemoveAccessor.WithAnnotation(methodMapping);
}
return astEvent;
MethodDefinition accessor = eventDef.AddMethod ?? eventDef.RemoveMethod;
if (accessor.IsVirtual ^ !accessor.IsNewSlot) {
if (TypesHierarchyHelpers.FindBaseMethods(accessor).Any())
astEvent.Modifiers |= Modifiers.New;
}
return astEvent;
}
public bool DecompileMethodBodies { get; set; }

Loading…
Cancel
Save