﻿/// <summary>
/// Used by the ModuleInit. All code inside the Initialize method is ran as soon as the assembly is loaded.
/// </summary>
public static class ModuleInitializer
{
    /// <summary>
    /// Initializes the module.
    /// </summary>
    public static void Initialize()
    {

    }
}
﻿using System.Reactive.Concurrency;
using ReactiveUI;

/// <summary>
/// Used by the ModuleInit. All code inside the Initialize method is ran as soon as the assembly is loaded.
/// </summary>
public static class ModuleInitializer
{
    /// <summary>
    /// Initializes the module.
    /// </summary>
    public static void Initialize()
    {
        RxApp.MainThreadScheduler = new WaitForDispatcherScheduler(() => DispatcherScheduler.Current);
    }
}
Make sure the MainThreadScheduler is set properly
Make sure the MainThreadScheduler is set properly

Fixes an issue when running SaveAllTheTime with ReSharper where
ReactiveUI detects it is running in a test runner, this causes the
MainThreadScheduler to not run subscribe delegates on the dispatcher in
some cases where required
