#if WINDOWS_WSA || WINDOWS_UWP using System; namespace Foundation.Tasks { public partial class TaskManager { /// /// Checks if this is the main thread /// public static bool IsMainThread { get { return Environment.CurrentManagedThreadId == MainThread; } } /// /// The Main Thread /// public static int MainThread { get; protected set; } /// /// The Current Thread /// public static int CurrentThread { get { return Environment.CurrentManagedThreadId; } } } } #endif