本文整理汇总了C#中Microsoft.Build.BuildEngine.BuildItemGroup.RemoveItemAt方法的典型用法代码示例。如果您正苦于以下问题:C# BuildItemGroup.RemoveItemAt方法的具体用法?C# BuildItemGroup.RemoveItemAt怎么用?C# BuildItemGroup.RemoveItemAt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Build.BuildEngine.BuildItemGroup
的用法示例。
在下文中一共展示了BuildItemGroup.RemoveItemAt方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestRemoveItemAt3
public void TestRemoveItemAt3 ()
{
BuildItemGroup big = new BuildItemGroup ();
big.AddNewItem ("a", "b");
big.AddNewItem ("b", "c");
big.AddNewItem ("c", "d");
big.RemoveItemAt (3);
}
示例2: RemoveItemAtFirstItem
public void RemoveItemAtFirstItem()
{
BuildItemGroup group = new BuildItemGroup();
group.AddNewItem("n1", "i1");
group.AddNewItem("n2", "i2");
group.AddNewItem("n3", "i3");
group.RemoveItemAt(0);
Assertion.AssertEquals(2, group.Count);
Dictionary<string, string> items = GetDictionaryOfBuildItemsInBuildItemsGroup(group);
Assertion.AssertEquals("i2", items["n2"]);
Assertion.AssertEquals("i3", items["n3"]);
}
示例3: TestRemoveItemAt1
public void TestRemoveItemAt1 ()
{
BuildItemGroup big = new BuildItemGroup ();
big.AddNewItem ("a", "b");
big.AddNewItem ("b", "c");
big.AddNewItem ("c", "d");
big.RemoveItemAt (1);
BuildItem[] items = big.ToArray ();
Assert.AreEqual (2, big.Count, "A1");
Assert.AreEqual ("a", items [0].Name, "A2");
Assert.AreEqual ("c", items [1].Name, "A3");
}
示例4: RemoveItemAt1
public void RemoveItemAt1()
{
XmlElement ig = CreatePersistedItemGroupElement();
BuildItemGroup group = new BuildItemGroup(ig, false, new Project());
BuildItem i2 = group[1];
group.RemoveItemAt(1);
Assertion.AssertEquals(1, group.Count);
Assertion.AssertEquals(1, group.ItemGroupElement.ChildNodes.Count);
Assertion.AssertEquals("i1", group[0].Include);
Assertion.AssertEquals(null, i2.ParentPersistedItemGroup);
}