Grabacr07 / VirtualDesktop

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

Add synchronous Initialize method #38

Closed danielchalmers closed 6 years ago

danielchalmers commented 6 years ago

This renames the current Task Initialize methods to InitializeAsync, and adds void Initialize. It's a breaking change, but only affects v3 (which is in beta). I didn't include the cached _initializationTask, because I figure Initialize should only be called once so it's unnecessary, but LMK.

This can help as a workaround to #37. also fixes a bug where calling initialize, enabling AutoRestart, then calling initialize again won't trigger this.ComObjects.Listen()

LMK what you think!

danielchalmers commented 6 years ago

not sure if this is the way to go. closing for now.