Summary
[DelegateCommand] / [AsyncDelegateCommand] currently reject execute methods that return Task<TResult> (documented in README and enforced in DelegateCommandGenerator).
Motivation
Some async APIs return Task<T> rather than non-generic Task or ValueTask<T>. Supporting this shape would reduce friction when wiring Prism commands.
Proposed direction
- Define emission strategy (e.g. discard result vs. surface as command generic type).
- Add diagnostics for unsupported combinations (similar to PSG1001 for CancellationToken + ValueTask).
- Extend unit/snapshot tests and README/docs.
References
- README: Task<TResult> is not supported for execute methods.
- DelegateCommandGenerator.cs comment: unchanged since initial release.
Summary
[DelegateCommand] / [AsyncDelegateCommand] currently reject execute methods that return Task<TResult> (documented in README and enforced in DelegateCommandGenerator).
Motivation
Some async APIs return Task<T> rather than non-generic Task or ValueTask<T>. Supporting this shape would reduce friction when wiring Prism commands.
Proposed direction
References