DarthMazut / MochaLibrary

Just another MVVM library which gives you some abstract classes out-of-the-box.
0 stars 0 forks source link

Why Dipsatcher requires Func<Task> instead of Action? #14

Closed DarthMazut closed 10 months ago

DarthMazut commented 10 months ago

Why IDispatcher.RunOnMainThreadAsync() requires Func? What if I'd like to await for a sync call to be executed on UI thread? Is Dispatcher behaves correctly when we're passing async Action to it i.e.

DispatcherManager.GetMainThreadDispatcher().RunOnMainThread(async () => 
{
    await ...
})
DarthMazut commented 10 months ago

Fixed with 18e5059: Following members were added to IDispatcher interface: