Beispiel #1
0
        public override IEnumerable <TreeNodeData> CreateChildren()
        {
            if (analyzedProperty.GetMethod != null)
            {
                yield return(new PropertyAccessorNode(analyzedProperty.GetMethod, dnSpy_Analyzer_Resources.PropertyGetterTreeNode));
            }
            if (analyzedProperty.SetMethod != null)
            {
                yield return(new PropertyAccessorNode(analyzedProperty.SetMethod, dnSpy_Analyzer_Resources.PropertySetterTreeNode));
            }
            foreach (var accessor in analyzedProperty.OtherMethods)
            {
                yield return(new PropertyAccessorNode(accessor, null));
            }

            if (PropertyOverriddenNode.CanShow(analyzedProperty))
            {
                yield return(new PropertyOverriddenNode(analyzedProperty));
            }
            if (PropertyOverridesNode.CanShow(analyzedProperty))
            {
                yield return(new PropertyOverridesNode(analyzedProperty));
            }
            if (InterfacePropertyImplementedByNode.CanShow(analyzedProperty))
            {
                yield return(new InterfacePropertyImplementedByNode(analyzedProperty));
            }
        }
Beispiel #2
0
        public override IEnumerable <TreeNodeData> CreateChildren()
        {
            if (!(analyzedProperty.GetMethod is null))
            {
                yield return(new PropertyAccessorNode(analyzedProperty.GetMethod, "get"));
            }

            if (!(analyzedProperty.SetMethod is null))
            {
                yield return(new PropertyAccessorNode(analyzedProperty.SetMethod, "set"));
            }

            foreach (var accessor in analyzedProperty.OtherMethods)
            {
                yield return(new PropertyAccessorNode(accessor, null));
            }

            if (PropertyOverriddenNode.CanShow(analyzedProperty))
            {
                yield return(new PropertyOverriddenNode(analyzedProperty));
            }

            if (PropertyOverridesNode.CanShow(analyzedProperty))
            {
                yield return(new PropertyOverridesNode(analyzedProperty));
            }

            if (InterfacePropertyImplementedByNode.CanShow(analyzedProperty))
            {
                yield return(new InterfacePropertyImplementedByNode(analyzedProperty));
            }
        }