jeudi 13 octobre 2016

C# Command Pattern confusion

I have, unknowingly, been using the command pattern where the client & the invoker are the same and they call the commands directly. After looking at the definition on DoFactory, I am a bit confused.

There are the individual commands. That hasn't changed from my naive understanding. I guess the invoker simply calls out all the commands. But what is the purpose of the receiver? That I don't get.

If possible, can someone give me an example with multiple commands and how to go about implementing?

Aucun commentaire:

Enregistrer un commentaire