Commands And Capabilities Map

reactive ICommand primitives and the 22 opt-in behavior contracts

Commands And Capabilities Map reactive ICommand primitives and the 22 opt-in behavior contracts Commands And Capabilities Map reactive ICommand primitives and the 22 opt-in behavior contracts Command primitives Capability families ICommand / ICommand<T> sync execute + predicate generic payload variant IAsyncCommand cancellable ExecuteAsync in-flight state + errors RelayCommand optional predicate + task trigger + imperative CanExecuteChanged disposed command becomes inert AsyncRelayCommand async task + cancellation token single-flight execution state errors channel + trigger support CompositeCommand execute every enabled inner command aggregate CanExecute over children DecoratorCommand inner command + extra gate optional pre/post actions ConfirmationDecoratorCommand confirm delegate before Execute ExecuteAsync and errors channel fluent Confirm helper overloads Selection family ISelectable IDeselectable ISelectionTogglable Expansion family IExpandable ICollapsible IExpansionTogglable Lifecycle family IConstructable IDestructable IReconstructable Dialog / form family IClosable IApprovable ICancelable Search / filter family ISearchable IFilterable<TItem> Paging family IPageable page navigation surface only CRUD family INewCreatable IDeletable<T> IUpdatable<T> ISavable<T> Container-current family ICurrentDeletable ICurrentUpdatable Management escape hatch IManagable<T> consumer-specific management action Typical compositions CompositeVM.Current -> ModeledCrudCommands triggers ExpandableState delegates expansion capabilities PagedComposition implements IPageable over a filtered source FormVM and dialogs wire commands rather than grow a custom command type Why micro-interfaces matter Capability interfaces advertise exactly the verbs a VM supports, so command bars and view adapters can stay capability-based without reshaping the core VM hierarchy. sync capability verbs async workflows compose CRUD extra gate confirm / dialog integration implemented by helpers

Command stack

  • ICommand and IAsyncCommand define the synchronous and cancellable asynchronous contracts.
  • RelayCommand and AsyncRelayCommand are the concrete execution workhorses.
  • CompositeCommand and decorator commands layer orchestration and gating without changing the ICommand contract.

Capability taxonomy

  • The selection and expansion triples stay granular on purpose.
  • CRUD is split into independent verb interfaces so VMs advertise only the mutations they support.
  • Paging is a navigation contract; it does not imply a specific container implementation.

Practical wiring

  • ModeledCrudCommands turns current-selection state into concrete commands.
  • FormVM, dialog flows, and confirmation helpers compose with the same command surface.
  • This map explains the capability-aware action bar used in the flagship example.