public override void VisitCustomEventDeclaration(CustomEventDeclaration eventDeclaration) { if (eventDeclaration.IsPublic()) { base.VisitCustomEventDeclaration(eventDeclaration); } else { eventDeclaration.Remove(); } }
public override void VisitCustomEventDeclaration(CustomEventDeclaration d) { if (d.Modifiers.HasFlag(Modifiers.Private) || d.Modifiers.HasFlag(Modifiers.Internal)) { d.Remove(); } else { RemoveAttributes(d.Attributes); RemoveAttributes(d.AddAccessor?.Attributes); RemoveAttributes(d.RemoveAccessor?.Attributes); base.VisitCustomEventDeclaration(d); } }