Well, the foreach cycle serves only for the purpose of the given example. It demonstrates splitting a task to a series of smaller tasks, adding an IsCancelled check inbetween. As for our implementation of delegate command, it only guarantees that the delegate will invoke its underlying method if the conditions provided by CanExcute are successfully met. Adding cancelling logic goes in the domain of the concerte method implementation, while the delegate command pattern is the needed infrastructure to invoke the method properly.
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items