當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。