public static ICollection <ImplementedMember> GetExplicitlyImplementedEvents(this EventDefinition self) { V_0 = new List <ImplementedMember>(); if (!self.IsExplicitImplementation()) { return(V_0); } if (self.get_AddMethod() != null) { V_1 = self.get_AddMethod().GetExplicitlyImplementedMethods().GetEnumerator(); try { while (V_1.MoveNext()) { V_2 = V_1.get_Current(); V_3 = EventDefinitionExtensions.GetMethodDeclaringEvent(V_2.get_Member() as MethodReference); if (V_3 == null) { continue; } V_0.Add(new ImplementedMember(V_2.get_DeclaringType(), V_3)); } } finally { if (V_1 != null) { V_1.Dispose(); } } return(V_0); } if (self.get_RemoveMethod() == null) { return(V_0); } V_1 = self.get_RemoveMethod().GetExplicitlyImplementedMethods().GetEnumerator(); try { while (V_1.MoveNext()) { V_4 = V_1.get_Current(); V_5 = EventDefinitionExtensions.GetMethodDeclaringEvent(V_4.get_Member() as MethodReference); if (V_5 == null) { continue; } V_0.Add(new ImplementedMember(V_4.get_DeclaringType(), V_5)); } } finally { if (V_1 != null) { V_1.Dispose(); } } return(V_0); }
public static ICollection <EventDefinition> GetOverridenAndImplementedEvents(this EventDefinition self) { V_0 = new List <EventDefinition>(); V_0.Add(self); if (self.get_AddMethod() == null) { if (self.get_RemoveMethod() != null) { V_1 = self.get_RemoveMethod().GetOverridenAndImplementedMethods().GetEnumerator(); try { while (V_1.MoveNext()) { V_3 = EventDefinitionExtensions.GetMethodDeclaringEvent(V_1.get_Current()); if (V_3 == null) { continue; } V_0.Add(V_3); } } finally { if (V_1 != null) { V_1.Dispose(); } } } } else { V_1 = self.get_AddMethod().GetOverridenAndImplementedMethods().GetEnumerator(); try { while (V_1.MoveNext()) { V_2 = EventDefinitionExtensions.GetMethodDeclaringEvent(V_1.get_Current()); if (V_2 == null) { continue; } V_0.Add(V_2); } } finally { if (V_1 != null) { V_1.Dispose(); } } } return(V_0); }