4 using System.Threading.Tasks;
6 using SiliconStudio.Presentation.ViewModel;
8 namespace SiliconStudio.Presentation.
Commands
12 private readonly Action<object> action;
15 : base(serviceProvider)
21 : base(serviceProvider)
23 this.action = x => action();
26 public override void Execute(
object parameter)
28 Task.Run(() => action(parameter));
33 await Task.Run(() => action(parameter));
async Task ExecuteAwaitable(object parameter=null)
A service provider class for view model objects.
override void Execute(object parameter)
AsyncCommand(IViewModelServiceProvider serviceProvider, Action< object > action)
An abstract class that is the base implementation of the ICommandBase interface.
AsyncCommand(IViewModelServiceProvider serviceProvider, Action action)