本文整理汇总了C#中Microsoft.Build.BuildEngine.BuildItemGroup.Cast方法的典型用法代码示例。如果您正苦于以下问题:C# BuildItemGroup.Cast方法的具体用法?C# BuildItemGroup.Cast怎么用?C# BuildItemGroup.Cast使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Build.BuildEngine.BuildItemGroup
的用法示例。
在下文中一共展示了BuildItemGroup.Cast方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ResolveBinary_FancyStuff
public void ResolveBinary_FancyStuff ()
{
engine = new Engine (Consts.BinPath);
project = engine.CreateNewProject ();
project.LoadXml (ResolveAssembly (null, @"Test\resources\binary\FancyStuff.dll"));
Assert.IsTrue (project.Build ("A"), "A1");
big = project.GetEvaluatedItemsByName ("ResolvedFiles");
Assert.AreEqual (1, big.Count, "A2");
Assert.IsTrue (big[0].Include.EndsWith ("FancyStuff.dll"), "A3");
big = project.GetEvaluatedItemsByName ("ResolvedDependencyFiles");
Assert.AreEqual (1, big.Count, "A4");
Assert.IsTrue (big.Cast<BuildItem> ().Any (item => item.Include.EndsWith ("SimpleWrite.dll")), "A5");
}