TaskUtilitiesEnsureSTAThreadTaskT Method (FuncT) |
If the current thread is STA, run the specified function, otherwise start an STA thread and run the function in this new thread.
Namespace:
ShellBoost.Core.Utilities
Assembly:
ShellBoost.Core (in ShellBoost.Core.dll) Version: 1.8.3.0
Syntax public static Task<T> EnsureSTAThreadTask<T>(
Func<T> func
)
Parameters
- func
- Type: SystemFuncT
The function.
Type Parameters
- T
- The return type
Return Value
Type:
TaskTAn instance of the Task class.
Exceptions See Also