mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-22 01:16:17 +08:00
16 lines
480 B
C#
16 lines
480 B
C#
using static System.Application.MainThreadDesktop;
|
|
|
|
namespace System.Application.Services
|
|
{
|
|
/// <summary>
|
|
/// 由平台实现的主线程帮助类
|
|
/// </summary>
|
|
public interface IMainThreadPlatformService
|
|
{
|
|
bool PlatformIsMainThread { get; }
|
|
|
|
void PlatformBeginInvokeOnMainThread(Action action, DispatcherPriority? priority = null);
|
|
|
|
public static IMainThreadPlatformService Instance => DI.Get<IMainThreadPlatformService>();
|
|
}
|
|
} |