ThreadHelper ThreadHelper ThreadHelper ThreadHelper ThreadHelper ThreadHelper Class

Definition

Provides a generic dispatcher helper to ensure that a method is invoked on the application's main thread.

public ref class ThreadHelper abstract
[Windows::Foundation::Metadata::WebHostHidden]
public ref class ThreadHelper abstract
[Windows::Foundation::Metadata::WebHostHidden]
class ThreadHelper abstract
public abstract class ThreadHelper
type ThreadHelper = class
Public MustInherit Class ThreadHelper
Inheritance
ThreadHelperThreadHelperThreadHelperThreadHelperThreadHelperThreadHelper

Constructors

ThreadHelper() ThreadHelper() ThreadHelper() ThreadHelper() ThreadHelper() ThreadHelper()

Initializes a new instance of ThreadHelper.

Properties

Generic Generic Generic Generic Generic Generic

Gets a generic ThreadHelper.

JoinableTaskContext JoinableTaskContext JoinableTaskContext JoinableTaskContext JoinableTaskContext JoinableTaskContext

Gets the singleton JoinableTaskContext instance for Visual Studio.

JoinableTaskFactory JoinableTaskFactory JoinableTaskFactory JoinableTaskFactory JoinableTaskFactory JoinableTaskFactory

Gets the joinable task factory for Visual Studio.

Methods

BeginInvoke(Action) BeginInvoke(Action) BeginInvoke(Action) BeginInvoke(Action) BeginInvoke(Action) BeginInvoke(Action)

Schedules an action for execution on the UI thread asynchronously.

BeginInvoke(DispatcherPriority, Action) BeginInvoke(DispatcherPriority, Action) BeginInvoke(DispatcherPriority, Action) BeginInvoke(DispatcherPriority, Action) BeginInvoke(DispatcherPriority, Action) BeginInvoke(DispatcherPriority, Action)

Schedules an action for execution on the UI thread asynchronously.

CheckAccess() CheckAccess() CheckAccess() CheckAccess() CheckAccess() CheckAccess()

Determines whether the call is being made on the UI thread.

GetInvocationWrapper() GetInvocationWrapper() GetInvocationWrapper() GetInvocationWrapper() GetInvocationWrapper() GetInvocationWrapper()

Gets the invocation wrapper.

Invoke(Action) Invoke(Action) Invoke(Action) Invoke(Action) Invoke(Action) Invoke(Action)

Calls an action on the UI thread, re-entering (if necessary) any code already executing on the UI thread.

Invoke<TResult>(Func<TResult>) Invoke<TResult>(Func<TResult>) Invoke<TResult>(Func<TResult>) Invoke<TResult>(Func<TResult>) Invoke<TResult>(Func<TResult>) Invoke<TResult>(Func<TResult>)

Evaluate a function on the UI thread.

InvokeAsync(Action, Func<Boolean>) InvokeAsync(Action, Func<Boolean>) InvokeAsync(Action, Func<Boolean>) InvokeAsync(Action, Func<Boolean>) InvokeAsync(Action, Func<Boolean>) InvokeAsync(Action, Func<Boolean>)

Makes the RPC call to invoke the action like Invoke(Action) method but on the background thread. Since it is on the background thread, it doesn't block until the RPC call is served. If the RPC call fails, it retries until the onRpcCallFailed returns true. This method is also different from the BeginInvoke(Action) method, which uses the UI thread dispatcher, and it may not be in a state to process the request immediately (for example, it can be in a pumping wait).

ThrowIfNotOnUIThread(String) ThrowIfNotOnUIThread(String) ThrowIfNotOnUIThread(String) ThrowIfNotOnUIThread(String) ThrowIfNotOnUIThread(String) ThrowIfNotOnUIThread(String)

Determines whether the call is being made on the UI thread, and throws COMException(RPC_E_WRONG_THREAD) if it is not.

ThrowIfOnUIThread(String) ThrowIfOnUIThread(String) ThrowIfOnUIThread(String) ThrowIfOnUIThread(String) ThrowIfOnUIThread(String) ThrowIfOnUIThread(String)

Determines whether the call is being made on the UI thread ,and throws COMException(RPC_E_WRONG_THREAD) if it is.

Extension Methods

FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)
IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

Applies to