This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class SchedulerExtensions | |
{ | |
/// <summary> | |
/// Schedules an action to be executed. | |
/// </summary> | |
/// <param name="scheduler">Scheduler to execute the action on.</param> | |
/// <param name="action">Action to execute.</param> | |
/// <returns>The disposable object used to cancel the scheduled action (best effort).</returns> | |
/// <exception cref="ArgumentNullException"><paramref name="scheduler"/> or <paramref name="action"/> is <c>null</c>.</exception> | |
public static IDisposable MinimalSchedule(this IScheduler scheduler, Action action) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* IDataVirtualizingCollection<T> implements IList<T>, INotifyPropertyChanged, INotifyCollectionChanged and IDisposable. | |
Hence, everything you would need to bind to a ItemsSource from a DataGrid, ListBox or other ItemsControls. */ | |
protected IDataVirtualizingCollection<ITitLikeViewModel> CreateDataVirtualizingCollection() | |
=> CollectionBuilder<ITitLikeViewModel> // A CollectionBuilder creates data virtualizing collections for you. | |
.CreateBuilder() | |
/* At the moment, there are three further building functions: | |
BuildAHoardingSyncCollection(...), BuildAPreloadingAsyncCollection(...), BuildAHoardingAsyncCollection(...). | |
The async collections need two Scheduler passed to them. A scheduler for the background tasks like the SubscriptionScheduler | |
below and the DispatcherScheduler like the ObserveScheduler below for UI notifications. | |
The BasicAccess parameter is crucial for customizing the individual data access in your project. |