本文整理汇总了C#中Microsoft.Build.Evaluation.ResolveAllProperties方法的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.Build.Evaluation.ResolveAllProperties方法的具体用法?C# Microsoft.Build.Evaluation.ResolveAllProperties怎么用?C# Microsoft.Build.Evaluation.ResolveAllProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Build.Evaluation
的用法示例。
在下文中一共展示了Microsoft.Build.Evaluation.ResolveAllProperties方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Children
public static IEnumerable<MBEV.ResolvedImport> Children(this MBEV.ResolvedImport import, MBEV.Project project)
{
return project.Imports.Where(
i => string.Equals(i.ImportingElement.ContainingProject.FullPath,
project.ResolveAllProperties(import.ImportedProject.Location.File),
StringComparison.OrdinalIgnoreCase));
}
示例2: Dependencies
/// <summary>
/// Gets a collection of ProjectTargetInstances that this target is dependent on in a given project.
/// </summary>
/// <param name="target"></param>
/// <param name="project">The project to look in</param>
/// <returns></returns>
public static IEnumerable<MBEX.ProjectTargetInstance> Dependencies(
this MBEX.ProjectTargetInstance target, MBEV.Project project)
{
var dependencies = new List<MBEX.ProjectTargetInstance>();
var dependencyTargetNames = project.ResolveAllProperties(target.DependsOnTargets)
.Replace(Environment.NewLine, "")
.Split(';');
foreach (var name in dependencyTargetNames)
{
if (!string.IsNullOrWhiteSpace(name))
{
dependencies.Add(project.Targets[name.Trim()]);
}
}
return dependencies;
}