Executes the specified delegate asynchronously with the specified arguments on the thread that the Dispatcher was created on.

Namespace: Elysium.Extensions
Assembly: Elysium (in Elysium.dll) Version: 2.0.976.4 (2.0.976.4)

Syntax

C#
public static Object Invoke(
	this Dispatcher dispatcher,
	Action callback
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function Invoke ( 
	dispatcher As Dispatcher,
	callback As Action
) As Object

Parameters

dispatcher
Type: System.Windows.Threading..::..Dispatcher
Dispatcher instance.
callback
Type: System..::..Action
Callback method.

Return Value

Type: Object
An object, which is returned immediately after BeginInvoke()()()() is called, that can be used to interact with the delegate as it is pending execution in the event queue.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Dispatcher. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also