Click or drag to resize

ExtensionsRunDispatcherAsync Method

Runs the action asyncronously using the Dispatcher on the lowest priority. Handles neccessary setting of the IsLoading flag and the error handling.

Namespace:  Cauldron.XAML
Assembly:  Cauldron.Win32.WPF (in Cauldron.Win32.WPF.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static Task RunDispatcherAsync(
	this IViewModel viewModel,
	Func<Task> action
)

Parameters

viewModel
Type: Cauldron.XAML.ViewModelsIViewModel
The viewmodel to start the operation from
action
Type: SystemFuncTask
The action that occures

Return Value

Type: Task

[Missing <returns> documentation for "M:Cauldron.XAML.Extensions.RunDispatcherAsync(Cauldron.XAML.ViewModels.IViewModel,System.Func{System.Threading.Tasks.Task})"]

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IViewModel. 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).
Exceptions
ExceptionCondition
ArgumentNullExceptionviewModel is null
ArgumentNullExceptionaction is null
See Also