Skip to content
Nuvyntra Labs

Documentation

Commands

ModelCommand and AsyncModelCommand: CanExecute, concurrency, timeout, retry, and how they sit on the operation pipeline.

Commands

  • ModelCommand / ModelCommand<T> — sync; weak CanExecuteChanged.
  • AsyncModelCommand / AsyncModelCommand<T> — async, IsRunning, Cancel, ExecuteAsync; weak CanExecuteChanged.
  • ICommand.Execute never throws. Failures go to IErrorSink / IDialogs. ExecuteAsync still rethrows.
  • AsyncCommandOptions: timeout, retry, Debounce, Throttle, ConcurrencyMode (Prevent, CancelPrevious, Queue, Allow, Replace).
SaveCommand = new AsyncModelCommand(
    SaveAsync,
    () => CanSave,
    new AsyncCommandOptions
    {
        Concurrency = ConcurrencyMode.Prevent,
        Timeout = TimeSpan.FromSeconds(15),
        RetryCount = 2,
        RetryDelay = TimeSpan.FromSeconds(1),
    });

Discussion

Comment on Plugin.Wpf.MVVMExpress. The thread lives on this component's GitHub repository (nuvyntralabs/Plugin.Wpf.MVVMExpress). Sign in with GitHub — Giscus uses Discussions, Utterances uses Issues.