Files
SteamTools/System.Application.SteamTools.Client.Desktop.Avalonia/Services/Implementation/MainThreadPlatformServiceImpl.cs
T
2021-02-20 16:45:44 +08:00

11 lines
367 B
C#

using Avalonia.Threading;
namespace System.Application.Services.Implementation
{
internal sealed class MainThreadPlatformServiceImpl : IMainThreadPlatformService
{
public bool PlatformIsMainThread => Dispatcher.UIThread.CheckAccess();
public void PlatformBeginInvokeOnMainThread(Action action) => Dispatcher.UIThread.Post(action);
}
}