コード例 #1
0
        public override IEnumerable <INodeFactory> GetNodeChildren(IContext context)
        {
            foreach (ProjectItem item in _project.ProjectItems)
            {
                yield return(ProjectNodeFactory.Create(item));
            }

            var vsproj = _project.Object as VSLangProj.VSProject;

            if (null != vsproj)
            {
                yield return(new ReferenceCollectionNodeFactory(vsproj.References));
            }

            if (null != _project.Properties)
            {
                yield return(new PropertyCollectionNodeFactory("ProjectProperties", _project.Properties));
            }

            //if (null != _project.CodeModel)
            //{
            //    yield return new ProjectCodeModelNodeFactory(_project.CodeModel);
            //}

            if (null != _project.ConfigurationManager)
            {
                yield return(new ConfigurationsCollectionNodeFactory(_project));
            }
        }
コード例 #2
0
        public override IEnumerable <INodeFactory> GetNodeChildren(IContext context)
        {
            List <INodeFactory> factories = new List <INodeFactory>();

            if (null != _item.ProjectItems)
            {
                foreach (ProjectItem item in _item.ProjectItems)
                {
                    factories.Add(ProjectNodeFactory.Create(item));
                }
            }

            if (PathTopologyVersions.SupportsProjectItemCodeModel(context))
            {
                if (null != _item.FileCodeModel)
                {
                    factories.Add(new FileCodeModelNodeFactory(_item.FileCodeModel));
                }
            }

            if (null != _item.Properties)
            {
                factories.Add(new PropertyCollectionNodeFactory("ItemProperties", _item.Properties));
            }

            return(factories);
        }