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


C# ProjectReference.ResolveProject方法代码示例

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


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

示例1: GetDotNetProject

		DotNetProject GetDotNetProject (ProjectReference projectReference)
		{
			if (Loading || ParentSolution == null || projectReference.ReferenceType != ReferenceType.Project)
				return null;

			var project = projectReference.ResolveProject (ParentSolution) as DotNetProject;
			if (!(project is PackagingProject))
				return project;

			return null;
		}
开发者ID:PlayScriptRedux,项目名称:monodevelop,代码行数:11,代码来源:PackagingProject.cs

示例2: SignalRefChange

        public void SignalRefChange (ProjectReference refInfo, bool newState)
        {
			if (!showAll && refInfo.ReferenceType != ReferenceType.Package)
				return;
			
            TreeIter iter;
			bool found = false;
			
            if (store.GetIterFirst (out iter)) {
                do {
					if (refInfo.ReferenceType == (ReferenceType) store.GetValue(iter, ColType)) {
						switch (refInfo.ReferenceType) {
						case ReferenceType.Package:
							SystemAssembly systemAssembly = store.GetValue(iter, ColAssembly) as SystemAssembly;
							if ((refInfo.Reference == systemAssembly.FullName) && (refInfo.Package == systemAssembly.Package) )
								found = true;
							break;
						case ReferenceType.Project:
							var path = (FilePath)(string) store.GetValue (iter, ColFullName);
							var project = refInfo.ResolveProject (configureProject.ParentSolution);
							if (project != null && path.CanonicalPath == project.FileName.CanonicalPath)
								found = true;
							break;
						case ReferenceType.Assembly:
							var file = (FilePath)(string) store.GetValue (iter, ColFullName);
							if (file.CanonicalPath == refInfo.HintPath.CanonicalPath)
								found = true;
							break;
						}
					}
                } while (!found && store.IterNext (ref iter));
            }
			if (found)
				store.SetValue(iter, ColSelected, newState);
			SetSelection (refInfo.ReferenceType, refInfo.Reference, refInfo.Package != null ? refInfo.Package.Name : "", newState);
        }
开发者ID:hbons,项目名称:monodevelop,代码行数:36,代码来源:PackageReferencePanel.cs

示例3: AddProjectReference

		TreeIter AddProjectReference (ProjectReference refInfo)
		{
			Solution c = configureProject.ParentSolution;
			if (c == null) return TreeIter.Zero;

			Project p = refInfo.ResolveProject (c);
			if (p == null) return TreeIter.Zero;
			
			string txt = GLib.Markup.EscapeText (System.IO.Path.GetFileName (refInfo.Reference)) + "\n";
			txt += "<span color='darkgrey'><small>" + GLib.Markup.EscapeText (p.BaseDirectory.ToString ()) + "</small></span>";
			return refTreeStore.AppendValues (txt, GetTypeText (refInfo), p.BaseDirectory.ToString (), refInfo, ImageService.GetIcon ("md-project", IconSize.Dnd));
		}
开发者ID:hbons,项目名称:monodevelop,代码行数:12,代码来源:SelectReferenceDialog.cs


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