protected override void LoadChildren() { if (analyzedEvent.AddMethod != null) { this.Children.Add(new AnalyzedEventAccessorTreeNode(analyzedEvent.AddMethod, "add")); } if (analyzedEvent.RemoveMethod != null) { this.Children.Add(new AnalyzedEventAccessorTreeNode(analyzedEvent.RemoveMethod, "remove")); } foreach (var accessor in analyzedEvent.OtherMethods) { this.Children.Add(new AnalyzedEventAccessorTreeNode(accessor, null)); } if (AnalyzedEventFiredByTreeNode.CanShow(analyzedEvent)) { this.Children.Add(new AnalyzedEventFiredByTreeNode(analyzedEvent)); } if (AnalyzedEventOverridesTreeNode.CanShow(analyzedEvent)) { this.Children.Add(new AnalyzedEventOverridesTreeNode(analyzedEvent)); } if (AnalyzedInterfaceEventImplementedByTreeNode.CanShow(analyzedEvent)) { this.Children.Add(new AnalyzedInterfaceEventImplementedByTreeNode(analyzedEvent)); } }
public static bool CanShow(MemberReference member) { var property = member as EventDefinition; if (property == null) { return(false); } return(AnalyzedEventAccessorsTreeNode.CanShow(property) || AnalyzedEventOverridesTreeNode.CanShow(property)); }
public static bool CanShow(IMemberRef member) { var eventDef = member as EventDef; if (eventDef == null) { return(false); } return(!MainWindow.Instance.CurrentLanguage.ShowMember(eventDef.AddMethod ?? eventDef.RemoveMethod) || AnalyzedEventOverridesTreeNode.CanShow(eventDef)); }
protected override void LoadChildren() { if (AnalyzedEventAccessorsTreeNode.CanShow(analyzedEvent)) { this.Children.Add(new AnalyzedEventAccessorsTreeNode(analyzedEvent)); } if (AnalyzedEventOverridesTreeNode.CanShow(analyzedEvent)) { this.Children.Add(new AnalyzedEventOverridesTreeNode(analyzedEvent)); } if (AnalyzedInterfaceEventImplementedByTreeNode.CanShow(analyzedEvent)) { this.Children.Add(new AnalyzedInterfaceEventImplementedByTreeNode(analyzedEvent)); } }