Class ThreadHelper
- Namespace
- SunamoShared.SE
- Assembly
- SunamoShared.dll
Helper for thread-related operations including dispatcher checks and async sleep.
public class ThreadHelper
- Inheritance
-
ThreadHelper
- Inherited Members
- Extension Methods
Methods
NeedDispatcher(string)
Determines whether the given type name requires a UI dispatcher for access.
public static bool NeedDispatcher(string typeName)
Parameters
typeNamestringThe name of the collection type to check.
Returns
Sleep(int)
Pauses execution for the specified number of milliseconds. Uses Task.Delay in async mode, Thread.Sleep otherwise.
public static Task Sleep(int milliseconds)
Parameters
millisecondsintThe number of milliseconds to sleep.