lots of tidying up
This commit is contained in:
@@ -3,12 +3,9 @@ using Microsoft.UI.Dispatching;
|
||||
|
||||
namespace Hyperbar.Windows;
|
||||
|
||||
public class Dispatcher :
|
||||
public class Dispatcher(DispatcherQueue dispatcherQueue) :
|
||||
IDispatcher
|
||||
{
|
||||
private DispatcherQueue dispatcherQueue;
|
||||
|
||||
public Dispatcher() => dispatcherQueue = DispatcherQueue.GetForCurrentThread();
|
||||
|
||||
public async Task InvokeAsync(Action action) => await dispatcherQueue.EnqueueAsync(action.Invoke);
|
||||
public async Task InvokeAsync(Action action) =>
|
||||
await dispatcherQueue.EnqueueAsync(action.Invoke);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user