Grabacr07 / VirtualDesktop

C# wrapper for the Virtual Desktop API on Windows 11.
MIT License
631 stars 135 forks source link

fix: exception in VirtualDesktopProvider.Initialize #43

Open mpolicki opened 4 years ago

mpolicki commented 4 years ago

Fixes #37 TaskScheduler.FromCurrentSynchronizationContext throws an exception when SynchronizationContext.Current == null. Also, I don't see why a TaskScheduler would have to be obtained from a SynchronizationContext, so I simply made it use TaskScheduler.Current instead.