Open sandboxFocus

Interface IDispatcher

Defines the semantics of a facility that executes actions synchronously or asynchronously, possibly on a different thread.

Namespace: PostSharp.Patterns.Threading
Assembly: PostSharp.Patterns.Threading.dll
Syntax
public interface IDispatcher
Remarks

Use the DispatcherFactory class to get implementations of this interface. You can also create a custom implementation.

Properties

Name Description
IsInvokeSupported

Determines whether the Invoke(SendOrPostCallback, object) method is supported.

SynchronizationContext

Gets the SynchronizationContext associated with the current dispatcher.

Methods

Name Description
BeginInvoke(SendOrPostCallback, object)

Queues an action for asynchronous execution.

CheckAccess()

Determines whether the current thread has access to the current dispatcher.

Invoke(SendOrPostCallback, object)

Executes an action synchronously.

See Also