I\'m stuck, why isn\'t this working:
var childAction = new Action(blabla);
Action upperAction = (Action
Hang on, why do you want this to work?
Your childAction is something that accepts a CancelCommand and does something with it.
But upperAction could be invoked on any IDomainCommand, not just a CancelCommand. Supposing the above compiled; what should then happen when I do
upperAction(new EditCommand());
where class EditCommand : IDomainCommand ?
If you attempt an assignment the other way round:
var upperAction = new Action(idc => { });
Action childAction = upperAction;
it works and you don't even need a cast. Any Action counts as an Action.