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


C# IProject.GetItemsOfType方法代码示例

本文整理汇总了C#中IProject.GetItemsOfType方法的典型用法代码示例。如果您正苦于以下问题:C# IProject.GetItemsOfType方法的具体用法?C# IProject.GetItemsOfType怎么用?C# IProject.GetItemsOfType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IProject的用法示例。


在下文中一共展示了IProject.GetItemsOfType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: IsServiceReferencesFolder

 public static bool IsServiceReferencesFolder(IProject project, string folder)
 {
     foreach (ProjectItem item in project.GetItemsOfType(ItemType.ServiceReferences)) {
         var serviceReferenceProjectItem = (ServiceReferencesProjectItem)item;
         if (serviceReferenceProjectItem.IsDirectoryMatch(folder)) {
             return true;
         }
     }
     return false;
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:10,代码来源:ServiceReferencesProjectItem.cs

示例2: IsWebReferencesFolder

 /// <summary>
 /// Determines if the specified <paramref name="folder"/> is a
 /// web reference folder in the specified <paramref name="project"/>.
 /// </summary>
 /// <param name="project">The project.</param>
 /// <param name="folder">The full folder path.</param>
 public static bool IsWebReferencesFolder(IProject project, string folder)
 {
     foreach (ProjectItem item in project.GetItemsOfType(ItemType.WebReferences)) {
         var webReference = item as WebReferencesProjectItem;
         if (webReference.IsDirectoryMatch(folder)) {
             return true;
         }
     }
     return false;
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:16,代码来源:WebReferencesProjectItem.cs

示例3: GetFilesFromProject

		IEnumerable<FileName> GetFilesFromProject(IProject project)
		{
			if (project == null)
				return Enumerable.Empty<FileName>();
			return from item in project.GetItemsOfType(ItemType.Compile)
				where item.FileName.HasExtension(".cs")
				select item.FileName;
		}
开发者ID:Rpinski,项目名称:SharpDevelop,代码行数:8,代码来源:SearchForIssuesCommand.cs

示例4: ParseMSBuildProject

			/// <summary>
			/// Adds a ProjectToBuild item for the project and it's project references.
			/// Returns the added item, or null if an error occured.
			/// </summary>
			ProjectToBuild ParseMSBuildProject(IProject project)
			{
				ProjectToBuild ptb;
				if (parseMSBuildProjectProjectsToBuildDict.TryGetValue(project, out ptb)) {
					// only add each project once, reuse existing ProjectToBuild
					return ptb;
				}
				ptb = new ProjectToBuild(project.FileName, options.Target.TargetName);
				ptb.configuration = parentEngine.Configuration;
				ptb.platform = parentEngine.Platform;
				
				projectsToBuild.Add(ptb);
				parseMSBuildProjectProjectsToBuildDict[project] = ptb;
				
				foreach (ProjectItem item in project.GetItemsOfType(ItemType.ProjectReference)) {
					ProjectReferenceProjectItem prpi = item as ProjectReferenceProjectItem;
					if (prpi != null && prpi.ReferencedProject != null) {
						ProjectToBuild referencedProject = ParseMSBuildProject(prpi.ReferencedProject);
						if (referencedProject == null)
							return null;
						ptb.dependencies.Add(referencedProject);
					}
				}
				
				return ptb;
			}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:30,代码来源:MSBuildEngine.cs


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