add a central cache, for easy data retriveal
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using CommunityToolkit.WinUI;
|
||||
using Microsoft.UI.Dispatching;
|
||||
|
||||
namespace Hyperbar.Windows;
|
||||
|
||||
public class Dispatcher :
|
||||
IDispatcher
|
||||
{
|
||||
private DispatcherQueue dispatcherQueue;
|
||||
|
||||
public Dispatcher() => dispatcherQueue = DispatcherQueue.GetForCurrentThread();
|
||||
|
||||
public async Task InvokeAsync(Action action) => await dispatcherQueue.EnqueueAsync(action.Invoke);
|
||||
}
|
||||
Reference in New Issue
Block a user