/// <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() + ""))); }
/// <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"))); }