public static CompositeDisposable KeepCollectionInSync <T>(this IReactiveList <T> list, IList <T> destination, Func <T, bool> filter = null) { if (list == null) { throw new ArgumentNullException(nameof(list)); } if (destination == null) { throw new ArgumentNullException(nameof(destination)); } lock (list) { list.SyncCollection(destination, filter); return(list.TrackChanges(destination.Add, x => destination.Remove(x), reset => reset.SyncCollectionLocked(destination), filter)); } }