当前位置: 首页>>代码示例>>C#>>正文


C# ProjectNode类代码示例

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


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


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