@@ -3,17 +3,18 @@ using System.Threading.Tasks;
|
||||
using Windows.UI.Core;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Core.UWP;
|
||||
|
||||
public class UWPDispatcher : IDispatcher
|
||||
namespace Wino.Core.UWP
|
||||
{
|
||||
private readonly CoreDispatcher _coreDispatcher;
|
||||
|
||||
public UWPDispatcher(CoreDispatcher coreDispatcher)
|
||||
public class UWPDispatcher : IDispatcher
|
||||
{
|
||||
_coreDispatcher = coreDispatcher;
|
||||
}
|
||||
private readonly CoreDispatcher _coreDispatcher;
|
||||
|
||||
public Task ExecuteOnUIThread(Action action)
|
||||
=> _coreDispatcher.RunAsync(CoreDispatcherPriority.Normal, () => action()).AsTask();
|
||||
public UWPDispatcher(CoreDispatcher coreDispatcher)
|
||||
{
|
||||
_coreDispatcher = coreDispatcher;
|
||||
}
|
||||
|
||||
public Task ExecuteOnUIThread(Action action)
|
||||
=> _coreDispatcher.RunAsync(CoreDispatcherPriority.Normal, () => action()).AsTask();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user