示例#1
0
 /// <summary>
 /// Gets a copy of the Collection containing all changes made to it
 /// since it was last loaded, or since ItemList.AcceptChanges()
 /// was called, filtered by itemState.
 /// </summary>
 /// <typeparam name="BaseItem"></typeparam>
 /// <param name="list"></param>
 /// <param name="itemState"></param>
 /// <returns></returns>
 public static CustomList <BaseItem> GetChanges(this CustomList <BaseItem> list, ItemState itemState)
 {
     return(list.FindAll(item => item.State.Equals(itemState)));
 }
示例#2
0
 /// <summary>
 /// Gets a copy of the Collection that contains all changes made to
 /// it since it was loaded or ItemList.AcceptChanges() was last
 /// called.
 /// </summary>
 /// <typeparam name="BaseItem"></typeparam>
 /// <param name="list"></param>
 /// <returns></returns>
 public static CustomList <BaseItem> GetChanges(this CustomList <BaseItem> list)
 {
     return(list.FindAll(item => item.IsAdded ||
                         item.IsModified ||
                         item.IsDeleted));
 }
示例#3
0
 /// <summary>
 /// Gets a copy of the Collection containing all changes made to it
 /// since it was last loaded, or since ItemList.AcceptChanges()
 /// was called, filtered by itemState.
 /// </summary>
 /// <typeparam name="List<T>"></typeparam>
 /// <param name="list"></param>
 /// <param name="itemState"></param>
 /// <returns></returns>
 public static CustomList <T> GetChanges <T>(this CustomList <T> list, ItemState itemState)
 {
     return(list.FindAll(PredicateBuilder.Build <T>("item.State == ASL.DATA;.ItemState." + itemState.ToString() + "")));
 }
示例#4
0
 /// <summary>
 /// Clones the structure of the ItemList, including all Collection
 /// schemas and constraints.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="list"></param>
 /// <returns></returns>
 public static CustomList <T> Clone <T>(this CustomList <T> list)
 {
     return(new CustomList <T>());
 }
示例#5
0
 /// <summary>
 /// Gets a copy of the Collection that contains all changes made to
 /// it since it was loaded or ItemList.AcceptChanges() was last
 /// called.
 /// </summary>
 /// <typeparam name="List<T>"></typeparam>
 /// <param name="list"></param>
 /// <returns></returns>
 public static CustomList <T> GetChanges <T>(this CustomList <T> list)
 {
     return(list.FindAll(PredicateBuilder.Build <T>("item.IsAdded || item.IsModified || item.IsDeleted")));
 }