本文整理汇总了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;
}
示例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);
}
示例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));
}