当前位置: 首页>>代码示例>>C#>>正文


C# DataListViewModel.RemoveDataListItem方法代码示例

本文整理汇总了C#中Dev2.Studio.ViewModels.DataList.DataListViewModel.RemoveDataListItem方法的典型用法代码示例。如果您正苦于以下问题:C# DataListViewModel.RemoveDataListItem方法的具体用法?C# DataListViewModel.RemoveDataListItem怎么用?C# DataListViewModel.RemoveDataListItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dev2.Studio.ViewModels.DataList.DataListViewModel的用法示例。


在下文中一共展示了DataListViewModel.RemoveDataListItem方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DataListViewModel_RemoveDataListItem_WithRecsetItem_ShouldRemoveFromRecsetCollection

 public void DataListViewModel_RemoveDataListItem_WithRecsetItem_ShouldRemoveFromRecsetCollection()
 {
     //------------Setup for test--------------------------
     var dataListViewModel = new DataListViewModel(new Mock<IEventAggregator>().Object);
     const string recsetName = "recset";
     const string firstFieldName = "f1";
     var recSetDataModel = CreateRecsetDataListModelWithTwoFields(recsetName, firstFieldName, "f2");
     dataListViewModel.RecsetCollection.Add(recSetDataModel);
     var dataListParts = new List<IDataListVerifyPart>();
     var part = CreateRecsetPart(recsetName, firstFieldName);
     dataListParts.Add(part.Object);
     //----------------------Precondition----------------------------
     Assert.AreEqual(1, dataListViewModel.RecsetCollection.Count);
     //------------Execute Test---------------------------
     dataListViewModel.RemoveDataListItem(recSetDataModel);
     //------------Assert Results-------------------------
     Assert.AreEqual(0, dataListViewModel.RecsetCollection.Count);
 }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:18,代码来源:DataListViewModelTests.cs

示例2: DataListViewModel_RemoveDataListItem_WithRecsetFieldItem_ShouldRemoveFromRecsetChildrenCollection

 public void DataListViewModel_RemoveDataListItem_WithRecsetFieldItem_ShouldRemoveFromRecsetChildrenCollection()
 {
     //------------Setup for test--------------------------
     var dataListViewModel = new DataListViewModel(new Mock<IEventAggregator>().Object);
     const string recsetName = "recset";
     const string firstFieldName = "f1";
     IDataListItemModel recSetDataModel = DataListItemModelFactory.CreateDataListModel(recsetName, "A recordset of information about a car", enDev2ColumnArgumentDirection.Both);
     IDataListItemModel firstFieldDataListItemModel = CreateFieldDataListModel(firstFieldName, recSetDataModel);
     recSetDataModel.Children.Add(firstFieldDataListItemModel);
     recSetDataModel.Children.Add(CreateFieldDataListModel("f2", recSetDataModel));
     dataListViewModel.RecsetCollection.Add(recSetDataModel);
     var dataListParts = new List<IDataListVerifyPart>();
     var part = CreateRecsetPart(recsetName, firstFieldName);
     dataListParts.Add(part.Object);
     //----------------------Precondition----------------------------
     Assert.AreEqual(2, dataListViewModel.RecsetCollection[0].Children.Count);
     //------------Execute Test---------------------------
     dataListViewModel.RemoveDataListItem(firstFieldDataListItemModel);
     //------------Assert Results-------------------------
     Assert.AreEqual(1, dataListViewModel.RecsetCollection[0].Children.Count);
 }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:21,代码来源:DataListViewModelTests.cs

示例3: DataListViewModel_RemoveDataListItem_WithScalarItem_ShouldRemoveFromScalarCollection

 public void DataListViewModel_RemoveDataListItem_WithScalarItem_ShouldRemoveFromScalarCollection()
 {
     //------------Setup for test--------------------------
     var dataListViewModel = new DataListViewModel(new Mock<IEventAggregator>().Object);
     var scalarItem = new DataListItemModel("scalar");
     dataListViewModel.ScalarCollection.Add(scalarItem);
     //----------------------Precondition----------------------------
     Assert.AreEqual(1, dataListViewModel.ScalarCollection.Count);
     //------------Execute Test---------------------------
     dataListViewModel.RemoveDataListItem(scalarItem);
     //------------Assert Results-------------------------
     Assert.AreEqual(0, dataListViewModel.ScalarCollection.Count);
 }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:13,代码来源:DataListViewModelTests.cs


注:本文中的Dev2.Studio.ViewModels.DataList.DataListViewModel.RemoveDataListItem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。