zadjii-msft / PowerToys

Windows system utilities to maximize productivity
MIT License
2 stars 2 forks source link

Use the actual devhome code for loading extensions #8

Closed zadjii-msft closed 1 month ago

zadjii-msft commented 1 month ago

As in title.

I'm adding a ExtensionObject<T> object too. It doesn't enforce anything. We can use it to wrap up things we get from extensions. You get the object back out with .Unsafe, which is a mental clue "this object might not live in this process". It'll at least give us a better clue of all the places where accessing the object might not totally be safe.

Also fixes a bug that makes cmdpal a bit more resilient to an extension dying and being reloaded. Just go to all apps & back, and presto, reload.