rkeithhill / PoshWinRT

Windows Runtime API Interop Utilities for Windows PowerShell
MIT License
28 stars 15 forks source link

Added support for IAsyncAction #2

Closed xdhmoore closed 5 years ago

xdhmoore commented 5 years ago

I had some issues running the Set-LockscreenWallpaper function by @Sauler here, which uses this class. That powershell function needed a final AwaitResult() call at the end, which required support for the WinRT interface IAsyncAction instead of IAsyncOperator<T> . This PR adds support for IAsyncAction (and moves some logic into a common parent abstract class). Best I can tell, it is working when added to Set-LockscreenWallpaper.

My C#/Windows knowledge is fairly limited, so it's possible I did something Java-ish.

rkeithhill commented 5 years ago

Thanks!