ThreadHelper.Invoke<'TResult> Method (Func<'TResult>)
Visual Studio 2015
Evaluate a function on the UI thread.
Assembly: Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)
[<DebuggerStepThroughAttribute>] member Invoke<'TResult> : method:Func<'TResult> -> 'TResult
Parameters
- method
-
Type:
System.Func<'TResult>
The function to evaluate on the UI thread.
Return Value
Type: TResultReturns the result of the specified function evaluation.
Type Parameters
- TResult
The type of the function evaluation result.
If the caller is already on the UI thread, then the call is made directly. Otherwise, the call is transferred onto the UI thread, and this thread blocks until the call returns. If the UI thread throws an exception, that exception is transferred and thrown again on this thread.
Show: