Utils_LinqUpdateListFromListT1, T2 Method |
This function will update a target list using a source list.
Using a comparison function, it will find missing and obsolete objects.
All corresponding object in toList will be updated using the object in fromList.
Namespace:
MicaSystems.Utils
Assembly:
MicaSystems.Utils (in MicaSystems.Utils.dll) Version: 1.0.0.0 (1.1.0.123)
Syntax public static void UpdateListFromList<T1, T2>(
List<T1> fromList,
List<T2> toList,
Func<T1, T2, bool> compareFunction,
Func<T1, T2> createFunction,
Action<T1, T2> updateFunction
)
Parameters
- fromList
- Type: System.Collections.GenericListT1
Source list. - toList
- Type: System.Collections.GenericListT2
Target list. - compareFunction
- Type: SystemFuncT1, T2, Boolean
Function used to find corresponding objects between
fromList objects and toList objects. - createFunction
- Type: SystemFuncT1, T2
Function used to create missing objects in toList. - updateFunction
- Type: SystemActionT1, T2
Action used to update every object in toList.
Type Parameters
- T1
- Source list object type.
- T2
- Target list object type.
See Also