예제 #1
0
        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));
            }
        }
예제 #2
0
 protected override void LoadChildren()
 {
     if (AnalyzedEventAccessorsTreeNode.CanShow(analyzedEvent))
     {
         this.Children.Add(new AnalyzedEventAccessorsTreeNode(analyzedEvent));
     }
     if (AnalyzedEventOverridesTreeNode.CanShowAnalyzer(analyzedEvent))
     {
         this.Children.Add(new AnalyzedEventOverridesTreeNode(analyzedEvent));
     }
 }
예제 #3
0
        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));
        }
예제 #4
0
        public static bool CanShow(MemberReference member)
        {
            var property = member as EventDefinition;

            if (property == null)
            {
                return(false);
            }

            return(AnalyzedEventAccessorsTreeNode.CanShow(property) ||
                   AnalyzedEventOverridesTreeNode.CanShowAnalyzer(property));
        }