• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ProjectNode类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ProjectNode的典型用法代码示例。如果您正苦于以下问题:C# ProjectNode类的具体用法?C# ProjectNode怎么用?C# ProjectNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ProjectNode类属于命名空间,在下文中一共展示了ProjectNode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GlobalProjectProperties

		public GlobalProjectProperties(ProjectNode project)
		{
			msBuildProject = project.As<Project>();
			dteProject = project.As<EnvDTE.Project>();
			vsBuild = project.HierarchyNode.HierarchyIdentity.Hierarchy as IVsBuildPropertyStorage;
			accessor = new DynamicPropertyAccessor(this);
		}
开发者ID:kzu,项目名称:clide,代码行数:7,代码来源:GlobalProjectProperties.cs


示例2: TestAcceptsProjectReferenceToItSelf

		public void TestAcceptsProjectReferenceToItSelf()
		{
			ProjectNode projectNode = new ProjectNode(vsSolution, project.GUID);
			int before = project.Children.Count;
			projectNode.AddProjectReference(project.GUID);
			Assert.AreEqual<int>(before,project.Children.Count);
		}
开发者ID:Phidiax,项目名称:open-wssf-2015,代码行数:7,代码来源:ProjectNodeFixture.cs


示例3: AddProjectNode

		public TreeNode AddProjectNode(ExtTreeView classBrowser, IProject project)
		{
			ProjectNode prjNode = new ProjectNode(project);
			prjNode.AddTo(classBrowser);
			classBrowser.Sort();
			return prjNode;
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:DefaultProjectNodeBuilder.cs


示例4: SelectParentWillSelectAllChildrenExceptTheDisabledOnes

        public void SelectParentWillSelectAllChildrenExceptTheDisabledOnes()
        {
            // Arrange
            ProjectNode[] children = new ProjectNode[3];

            // make two children enabled, one disabled
            for (int i = 0; i < 3; i++)
            {
                var project = MockProjectUtility.CreateMockProject("p" + i);
                var node = new ProjectNode(project)
                {
                    IsEnabled = i % 2 == 0
                };
                children[i] = node;
            }

            var folder = new FolderNode(null, "A", children);

            // Act
            folder.IsSelected = true;

            // Assert
            Assert.True(children[0].IsSelected == true);
            Assert.True(children[1].IsSelected == false);
            Assert.True(children[2].IsSelected == true);
        }
开发者ID:Newtopian,项目名称:nuget,代码行数:26,代码来源:FolderNodeTest.cs


示例5: AddItemWithEmptyNameThrows

		public void AddItemWithEmptyNameThrows()
		{
			ProjectNode projectNode = new ProjectNode(vsSolution, project.GUID);
			string itemName = ".cs";
			string fullItemName = new FileInfo(itemName).FullName;
			projectNode.AddItem(itemName);
		}
开发者ID:Phidiax,项目名称:open-wssf-2015,代码行数:7,代码来源:ProjectNodeFixture.cs


示例6: TestCanAddItem

		public void TestCanAddItem()
		{
			ProjectNode projectNode = new ProjectNode(vsSolution, project.GUID);
			string itemName = "item1.cs";
			Assert.IsTrue(projectNode.CanAddItem(itemName));
			string invalidItemName = "<item1>.cs";
			Assert.IsFalse(projectNode.CanAddItem(invalidItemName));
		}
开发者ID:Phidiax,项目名称:open-wssf-2015,代码行数:8,代码来源:ProjectNodeFixture.cs


示例7: TestAddItem

		public void TestAddItem()
		{
			ProjectNode projectNode = new ProjectNode(vsSolution, project.GUID);
			string itemName = "item1.cs";
			projectNode.AddItem(itemName);
			string fullItemName = new FileInfo(itemName).FullName;
			Assert.IsTrue(project.Children.Contains(fullItemName));
		}
开发者ID:Phidiax,项目名称:open-wssf-2015,代码行数:8,代码来源:ProjectNodeFixture.cs


示例8: GetReferencesNeedCopy

 public IEnumerable<IDependencyNode> GetReferencesNeedCopy(ProjectNode dest)
 {
     var projectSources = dest.ProjectReferences.Where(r => r.CopyLocal)
         .Select(r => (IDependencyNode)r.Node);
     var assemblySources = dest.AssemblyReferences.Where(r => r.CopyLocal)
         .Select(LoadAssembly);
     return projectSources.Concat(assemblySources);
 }
开发者ID:xiaoyvr,项目名称:yam,代码行数:8,代码来源:ResolveContext.cs


示例9: OAProject

        public OAProject(ProjectNode project)
        {
            this.project = project;

            if (project is ProjectContainerNode)
            {
                this.solutionFolder = new Microsoft.VisualStudio.Package.Automation.OASolutionFolder<ProjectContainerNode>((ProjectContainerNode)project);
            }
        }
开发者ID:Jeremiahf,项目名称:wix3,代码行数:9,代码来源:oaproject.cs


示例10: ProjectPropertyIsCorrect

        public void ProjectPropertyIsCorrect()
        {
            // Arrange
            var project = MockProjectUtility.CreateMockProject("A");
            var node = new ProjectNode(project);

            // Act & Assert
            Assert.Same(project, node.Project);
        }
开发者ID:shrknt35,项目名称:sonarlint-vs,代码行数:9,代码来源:ProjectNodeTest.cs


示例11: IsSelectedFalseByDefault

        public void IsSelectedFalseByDefault()
        {
            // Arrange
            var project = MockProjectUtility.CreateMockProject("A");
            var node = new ProjectNode(project);

            // Act & Assert
            Assert.True(node.IsSelected == false);
        }
开发者ID:shrknt35,项目名称:sonarlint-vs,代码行数:9,代码来源:ProjectNodeTest.cs


示例12: NamePropertyIsCorrect

        public void NamePropertyIsCorrect()
        {
            // Arrange
            var project = MockProjectUtility.CreateMockProject("A");
            var node = new ProjectNode(project);

            // Act & Assert
            Assert.Equal("A", node.Name);
        }
开发者ID:shrknt35,项目名称:sonarlint-vs,代码行数:9,代码来源:ProjectNodeTest.cs


示例13: CreateCopyLocalSet

 private static CopyLocalSet CreateCopyLocalSet(ProjectNode p, ResolveContext context)
 {
     return new CopyLocalSet
     {
         Dest = p,
         ProjectCopySource = context.GetProjectReferencesNeedCopy(p).ToArray(),
         AssemblyCopySource = context.GetAssemblyReferencesNeedCopy(p).ToArray(),
         RuntimeCopySources = context.GetRuntimeReferencesNeedCopy(p).ToArray()
     };
 }
开发者ID:xiaoyvr,项目名称:yam,代码行数:10,代码来源:MSBuildPatcher.cs


示例14: ConfigProjectProperties

		public ConfigProjectProperties(ProjectNode project, string configName)
		{
			this.project = project;
			this.configName = configName;
			vsBuild = project.HierarchyNode.HierarchyIdentity.Hierarchy as IVsBuildPropertyStorage;
			if (vsBuild == null)
				tracer.Warn(Strings.ConfigProjectProperties.NonMsBuildProject(project.Text));

			accessor = new DynamicPropertyAccessor(this);
		}
开发者ID:kzu,项目名称:clide,代码行数:10,代码来源:ConfigProjectProperties.cs


示例15: GetSelectedProjectReturnsEmptyIfIsSelectedIsFalse

        public void GetSelectedProjectReturnsEmptyIfIsSelectedIsFalse()
        {
            // Arrange
            var project = MockProjectUtility.CreateMockProject("A");
            var node = new ProjectNode(project);

            // Act
            node.IsSelected = false;

            // Assert
            Assert.False(node.GetSelectedProjects().Any());
        }
开发者ID:shrknt35,项目名称:sonarlint-vs,代码行数:12,代码来源:ProjectNodeTest.cs


示例16: UserProjectProperties

		public UserProjectProperties(ProjectNode project)
		{
			this.project = project;
			msBuildProject = project.As<Project>();
			dteProject = project.As<EnvDTE.Project>();
			vsBuild = project.HierarchyNode.VsHierarchy as IVsBuildPropertyStorage;

			if (msBuildProject == null || vsBuild == null)
				tracer.Warn(Strings.UserProjectProperties.NonMsBuildProject(project.DisplayName));

			accessor = new DynamicPropertyAccessor(this);
		}
开发者ID:MobileEssentials,项目名称:clide,代码行数:12,代码来源:UserProjectProperties.cs


示例17: GetSelectedProjectReturnsProjectIfIsSelectedIsTrueAndIsEnabledIsTrue

        public void GetSelectedProjectReturnsProjectIfIsSelectedIsTrueAndIsEnabledIsTrue()
        {
            // Arrange
            var project = MockProjectUtility.CreateMockProject("A");
            var node = new ProjectNode(project);

            // Act
            node.IsSelected = true;
            node.IsEnabled = true;

            // Assert
            Assert.Same(project, node.GetSelectedProjects().Single());
        }
开发者ID:shrknt35,项目名称:sonarlint-vs,代码行数:13,代码来源:ProjectNodeTest.cs


示例18: BuildUp

 public ProjectNode BuildUp()
 {
     if (!cache.ContainsKey(projectFullPath))
     {
         var extractor = new ProjectExtractor(projectFullPath, resolveConfig);
         var project = new ProjectNode
                           {
                               Id = extractor.GetId(),
                               AssemblyReferences = GetAssemblyReferences(extractor),
                               ProjectReferences = GetProjectReferences(extractor),
                               RuntimeReferences = GetRuntimeReferences(extractor),
                               FullPath = projectFullPath,
                               Output = resolveConfig.GetAssemblyNameByProjectPath(projectFullPath)
                           };
         cache[projectFullPath] = project;
     }
     return cache[projectFullPath];
 }
开发者ID:xiaoyvr,项目名称:yam,代码行数:18,代码来源:ProjectBuilder.cs


示例19: AddProjectsToTree

        public static void AddProjectsToTree(Solution solution,ref Tree tree)
        {
            var projects = solution.Projects.ToList();
            var allreadyAddedProjects = tree.DescendantNodes().OfType<ProjectNode>().ToList();

            foreach (var project in projects)
            {
                var existingProject = allreadyAddedProjects.WithName(project.Name);
                if (existingProject != null)
                {
                    existingProject.Documents = project.Documents.ToList();
                }
                else
                {
                    existingProject = new ProjectNode(project);
                    tree.AddChild(existingProject);
                }
            }
        }
开发者ID:davidkron,项目名称:DevArch,代码行数:19,代码来源:ProjectTreeBuilder.cs


示例20: GetSelectedProjectReturnsEmptyIfIsSelectedIsFalseOrIsEnabledIsFalse

        public void GetSelectedProjectReturnsEmptyIfIsSelectedIsFalseOrIsEnabledIsFalse()
        {
            // Arrange
            var project = MockProjectUtility.CreateMockProject("A");
            var node = new ProjectNode(project);

            // Act
            node.IsSelected = false;
            node.IsEnabled = false;
            var result1 = node.GetSelectedProjects();

            node.IsSelected = true;
            node.IsEnabled = false;
            var result2 = node.GetSelectedProjects();

            node.IsSelected = false;
            node.IsEnabled = true;
            var result3 = node.GetSelectedProjects();

            // Assert
            Assert.False(result1.Any());
            Assert.False(result2.Any());
            Assert.False(result3.Any());
        }
开发者ID:shrknt35,项目名称:sonarlint-vs,代码行数:24,代码来源:ProjectNodeTest.cs



注:本文中的ProjectNode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ProjectReference类代码示例发布时间:2022-05-24
下一篇:
C# ProjectModelElementEnvoy类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap