Run your xunit-based tests on an STA thread with the WPF Dispatcher, a WinForms SynchronizationContext, or even a cross-platform generic UI thread emulation with a SynchronizationContext that keeps code running on a "main thread" for that test.
This PR is to let ThreadRental.cs use UI thread instead of creating and using a new thread. Then we can test it by generating NuGet package and use in the vsmac repo to test this feature. The overall goal is to make the UIFact using UI thread instead of manually referring to the SynchronizatonContext.Current instead.
This PR is to let ThreadRental.cs use UI thread instead of creating and using a new thread. Then we can test it by generating NuGet package and use in the vsmac repo to test this feature. The overall goal is to make the UIFact using UI thread instead of manually referring to the SynchronizatonContext.Current instead.