Skip to content

Commit b56a43f

Browse files
committed
Switch to explicit impl for redeclared events
The failing test from the previous commit causes the following metadata to be emitted: .property instance class [mscorlib]System.Action`1<bool> Property() { .get instance class [mscorlib]System.Action`1<bool> Castle.Proxies.IDerivedProxy::get_Property() } .property instance class [mscorlib]System.Action Property() { .get instance class [mscorlib]System.Action Castle.Proxies.IDerivedProxy::get_Property() } Obviously we need to switch to explicit implementation for one of these events in order to avoid a name collision. We do that by changing the "collision detection" such that it does not take into account events' return types; only their name matters.
1 parent f04a993 commit b56a43f

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/Castle.Core/DynamicProxy/Generators/MetaEvent.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,6 @@ public bool Equals(MetaEvent other)
128128
return true;
129129
}
130130

131-
if (!Type.Equals(other.Type))
132-
{
133-
return false;
134-
}
135-
136131
if (!StringComparer.OrdinalIgnoreCase.Equals(Name, other.Name))
137132
{
138133
return false;

0 commit comments

Comments
 (0)